From the tutor docs (Troubleshooting);
“Running migrations… Killed!” / “Command failed with status 137: docker-compose”¶
Open edX requires at least 4 GB RAM, in particular to run the SQL migrations. If the
tutor local quickstartcommand dies after displaying “Running migrations”, you most probably need to buy more memory or add swap to your machine. On Docker for Mac OS, by default, containers are allocated at most 2 GB of RAM. You should follow these instructions from the official Docker documentation to allocate at least 4-5 Gb to the Docker daemon.
If migrations were killed halfway, there is a good chance that the MySQL database is in a state that is hard to recover from. The easiest way to recover is simply to delete all the MySQL data and restart the quickstart process. After you have allocated more memory to the Docker daemon, run:
tutor local stop sudo rm -rf “$(tutor config printroot)/data/mysql” tutor local quickstart
I ran into trouble on an OVH VPS where OVH was auto-starting and running a preinstalled PHP stack. It started thrashing the disk. I shut the PHP stack down and the installation completed slowly on 4GB RAM.
In the mean time I had switched to VPSServer, again with 4GB RAM, then it indeed exited during MySQL migrations but with
django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query') The timeout is scripted somewhere at 20 seconds. This server had nothing running in the background.
The migrations only require the mysql container to be running. So I split up the docker compose yaml script and ran the four jobs separately. Afterwards I did have to run the
rake search index command. I ran this from the container shell but maybe this can be done by
tutor local run cms ./manage.py cms reindex_course --all --setup (?) I don’t know why this final part didn’t run when I split the docker-compose yaml in four. It seems to work for the rest.
Now, my question is, if I run multiple tutor instances on one server, can it share resources? How much resources are needed?