Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4031, 'The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior #64

Open
EllenEyes opened this issue Aug 28, 2024 · 1 comment

Comments

@EllenEyes
Copy link

EllenEyes commented Aug 28, 2024

Describe the bug
msyql interactive_timeout=30s,wait_timeout=30s
database connection failed aftrer wait_timeout
config PRE_PING doesnt works。

django's backend
dj_db_conn_pool.backends.mysql

Environment

  • Python Version:
    python3.12
    Django==3.0.3
    django-db-connection-pool==1.2.5

Traceback
Post traceback here.
4031, 'The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.
Optional: SQL and parameters
Post SQL and parameters here, Pay attention to hiding private information.
database settings here:
'default': {
#'ENGINE': 'django.db.backends.mysql',
'ENGINE': 'dj_db_conn_pool.backends.mysql',
'NAME': env_config.mysql_commodity_dbname,
'USER': env_config.mysql_commodity_username,
'PASSWORD': env_config.mysql_commodity_password,
'HOST': env_config.mysql_commodity_host,
'PORT': env_config.mysql_commodity_port,
'POOL_OPTIONS': {
'POOL_SIZE': 10,
'MAX_OVERFLOW': 5,
'RECYCLE': 2 * 60 * 60,
'PRE_PING': True,
'TIMEOUT': 60
}
}
PRE_PING doesnt works。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@EllenEyes and others