djangomigrate

Django migrate Killed every time


I uploaded an update to my production server. Every time I run migrate (python manage.py migrate), which took only a few seconds on my development machine, it hangs for a long time and then simply says "Killed".

This also bounces me out of the pipenv shell. I have tried using the migrate flags --list, --plan, and --fake, but they all do the same thing, hang and then "Killed." I accidentally ran makemigrations on the production machine first. Is that what screwed it up? How can I find out what is killing the process? And how can I fix it?

I desperately need to update the database to run the code that got installed. I have checked the database and none of the changes have been made. Also the migration files in the app have not been corrupted either. I am at a loss here.

Frank


Solution

  • Yes, it turned out to be a memory issue. I did not realize I was running in such a tight environment on my Digital Ocean droplet. I increased the memory size using their web interface and all is fine now. Thanks for everyone who at least considered my issue and to Erwin for suggesting that it was a memory issue.