Django myslq backend that fixes issue with long living connection
Project description
MySQL-server-has-gone-away
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
How to use:
-
For Django 1.x and 2.x use
pip install mysql_server_has_gone_away==1.0.0
-
For django 3.x use
pip install mysql_server_has_gone_away==2.0.0
-
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',
}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mysql_server_has_gone-2.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cc3c6e88b625016ac22e5ebf6ea360da20f1fa706edd960cbee7467a1a97cc5 |
|
MD5 | ff7427047c025372f230ebd9129e3e88 |
|
BLAKE2b-256 | 0c17a0e281c1e059533e259882041a10531dc32d586ce5eef98bcb81c68f00de |
Close
Hashes for mysql_server_has_gone-2.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 514fc11886e1fc18ee771fffbb6e75cb085cd69b3c4c350ef0f129a04b37556b |
|
MD5 | 012eecebd04f7ab438d8fea58d740ae5 |
|
BLAKE2b-256 | 30da8e9407abef3e599064dcb2eeb40c5d7f5af532a8b79c893f67c3238a3bf4 |