django-ftpserver icon indicating copy to clipboard operation
django-ftpserver copied to clipboard

MySQL Server Has Gone Away

Open griffinkelly opened this issue 6 years ago • 2 comments

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?

griffinkelly avatar Mar 08 '18 04:03 griffinkelly

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.

tokibito avatar Nov 27 '18 06:11 tokibito

@griffinkelly You can try to change max_allowed_packet and wait_timeout parameter in MySQL server config.

tokibito avatar Apr 26 '20 17:04 tokibito