Skip to main content

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:

  1. For Django 1.x and 2.x use pip install mysql_server_has_gone_away==1.0.0

  2. For django 3.x use pip install mysql_server_has_gone_away==2.0.0

  3. 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

mysql_server_has_gone_away-2.0.0.tar.gz (2.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page