This repository solves issue where database connection inside of django overlives MySQL database connection timeout specified in /etc/my.cnf wait_timeout = xxxx. See this issue
-
pip install
mysql_server_has_gone_away -
Put this engine into Django
settings.py:
DATABASES = {
'default': {
'ENGINE': 'mysql_server_has_gone_away',
#'NAME': 'database-name',
#'USER': 'database-user',
#'PASSWORD': 'database-password',
#'HOST': 'localhost',
}
}