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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d951cb6123d1e99b64743d6ba8c173960fafa05ce565d3b33890a0a2fb55624 |
|
MD5 | 352ea6a3b3f84d6b4f49b0d795787cca |
|
BLAKE2b-256 | 5761373dc94efab8c356fe99b6ac0d8182725e72f15bae9b554750f83ed3c20f |
Close
Hashes for mysql_server_has_gone-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1f24dc0b0073587aa623cde7ea05d437283bbf201086d57bf0e4ad4700bb708 |
|
MD5 | 5dfc180a58a26c50984bdd302ea7e766 |
|
BLAKE2b-256 | ded23a154eb5c9a5fcbdf2ef6aac6b0d9ec3f068252c27ec670e58ee503b1c8f |