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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60c20b5299f6debf014c9734ed1ee371adb76bf42648348d222e92eea319296f |
|
MD5 | 36a6d5a038ae9ac2b0092606c5ba68f8 |
|
BLAKE2b-256 | 67a437730bb7722372f634a4a7ec2e4b2f554ed7eca462ee91aaa43e320bc92a |
Close
Hashes for mysql_server_has_gone-2.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ceb77c0f02628e988eecfe03b1be62926029e91025e17fefdfe11e76afd29a7 |
|
MD5 | e8f84d99b67b2e6266a3b320249f1ba3 |
|
BLAKE2b-256 | 89fea9ef57f7799cbe8ee8edb2ca0c14bf9d2c04b66791432aa7064b0a26c857 |