Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8129873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:28:13+00:00 2026-06-06T08:28:13+00:00

print ‘restore db1’ run_command(‘pg_restore -i -h localhost -p 5432 -U postgres -d db1 -v

  • 0
print 'restore db1'
run_command('pg_restore -i -h localhost -p 5432 -U postgres -d db1 -v "/var/lib/project/backup/db1.backup" -c')
print '--- wait 3 seconds'
time.sleep(3)

print 'restore db2'
run_command('pg_restore -i -h localhost -p 5432 -U postgres -d db2 -v "/var/lib/project/backup/db2.backup" -c')
print '--- wait 3 seconds'
time.sleep(3)

print 'restoring mongodb'
run_command('/var/lib/project/bbds/mongodb-linux/bin/mongorestore /var/lib/project/backup/dump --drop')
print '--- wait 3 seconds'
time.sleep(3)

My run_command is basically taken from this.

On my console:

python ignition.py --load-fixtures
For safety, this process will run for about one minute.
setup LDAP
restore db1
['pg_restore', '-i', '-h', 'localhost', '-p', '5432', '-U', 'postgres', '-d', 'db1', '-v', '/var/lib/project/backup/db1.backup', '-c']
Password: 

It just stuck after entering password. Nothing happens afterward. I am not sure if it’s resource busy. pg_restore is still running according ps au|grep pg_restore and mongorestore is not. So it must be stuck with the first restore. I don’t think it’s memory full either because my virtual machine has only 512mb and it’s always full, and always uses the swap memory.

How do we know what it is doing? Sometimes it stucks on restoring mongo. So all these operations can cause problem.
How should I troubleshoot this?

Thanks.


When I killed the process , I get this traceback: http://pastebin.com/Cnv9P6HW
A reboot will “solve” the problem. It will allow me to run the script without problem. But that’s not stable. We will end up in limbo sometimes later.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:28:17+00:00Added an answer on June 6, 2026 at 8:28 am

    Your usage of pg_restore and mongorestore seems to be independent. I would try:

    • running each command directly from a command line (i.e. not via Python do_command())
    • putting these into separate scripts so you can work out which command is hanging

    Your mention of only 512MB RAM and always using swap suggests there isn’t enough free memory on this VM. What exactly does “stuck” mean? If the VM actually gets wedged and needs to be restarted, it most likely has run out of both RAM and swap. If you can still login but the restore script appears to be running for a longer than expected time, I would try to understand the resource usage using performance monitoring tools like iostat and vmstat.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

var print = function(text){ document.write(text); document.write(</br>); } var A = function(){ } A.prototype.name=A; var
print : D:\zjm_code\register2>python D:\Python25\Lib\site-packages\django\bin\django-adm in.py makemessages -l cn Error: This script should be run
Possible Duplicate: JSON pretty print using JavaScript I'm working on a project that will
Print all combinations of a number N, as a sum of positive integers? They
print <ul>; foreach ($arr as $value) { echo(<li> . $value[storeid] . . ($value[dvdstock] +
print() doesn't work in IE after opening a new window. It works in Chrome.
print "@_\n"; 4109 4121 6823 12967 12971 14003 20186 How do I sort it
Example: print max(chain_length(i) for i in xrange(1,10001)) This returns the maximum/biggest chain_length (an arbitrary
I print documents (batch print) using Word.Document.PrintOut method. How can I print a document
;print out division message mov rcx, 0 ;zero out register mov rax, [input] mov

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.