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

SQLAlchemy connection disconnects after 5 minutes of inactivity with ProxySQL 2.0.9 x #4736

Open
hert525 opened this issue Oct 30, 2024 · 0 comments

Comments

@hert525
Copy link

hert525 commented Oct 30, 2024

Description:

I am experiencing an issue with ProxySQL version 2.0.9 where connections to MySQL through SQLAlchemy disconnect after about 5 minutes of inactivity. Both ProxySQL and MySQL have wait_timeout and interactive_timeout set to 4 hours, but connections are still being dropped much sooner than expected.

Steps to Reproduce:

Set up ProxySQL 2.0.9 and configure wait_timeout and interactive_timeout on both ProxySQL and MySQL to 4 hours.
Connect to MySQL through ProxySQL using Python with SQLAlchemy.
Allow the connection to remain idle for 5 minutes.
Observe that the connection disconnects and an error message is displayed.
Expected Behavior:

The connection should remain active for up to 4 hours of inactivity, consistent with the wait_timeout and interactive_timeout configurations.

Observed Behavior:

The connection disconnects after about 5 minutes of inactivity. The error message received is:

The client was disconnected by the server because of inactivity, see wait_timeout and interactive_timeout

Additional Information:

ProxySQL version: 2.0.9
SQLAlchemy version: [specify your SQLAlchemy version here]
Python version: [specify your Python version here]
Both wait_timeout and interactive_timeout are configured to 4 hours on both ProxySQL and MySQL.
Any insights or suggestions to resolve this issue would be greatly appreciated. Thank you!

Let me know if you'd like any adjustments.

@hert525 hert525 changed the title SQLAlchemy connection disconnects after 5 minutes of inactivity with ProxySQL 2.0.9 SQLAlchemy connection disconnects after 5 minutes of inactivity with ProxySQL 2.0.9 x Nov 25, 2024
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

1 participant