Problem:
If a newly created docker container is showing a server error:
Check /edx/var/log/supervisor/lmstderr.log
If you see the error:
OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
Look for the file: /var/run/mysqld/mysqld.sock
If that socket file doesn’t exist, the server probably ran out of file descriptors.
The Fix:
On the server, run:
sudo sysctl fs.aio-max-nr=262144
Making the change persist across reboots:
Edit the file: sudo vi /etc/sysctl.conf
And add the line:
fs.aio-max-nr=262144