django-ftpserver
django-ftpserver copied to clipboard
MySQL Server Has Gone Away
Getting errors after running FTP server for a while:
OperationalError: (2006, 'MySQL server has gone away')
Trying to find best way to resolve it. I tried making the SQL connection persistent in the settings.py file. Is there someplace I can close the connection when idol? Another way to resolve?
The same problem exists in the web application. This happens, for example, when the application maintains a database connection for a longer time than the MySQL server maintains a connection. One solution is to set the application side database connection time shorter than the MySQL server timeout. I am considering adding signals.
@griffinkelly
You can try to change max_allowed_packet
and wait_timeout
parameter in MySQL server config.