1

Im using AWS MySQL Aurora, the current wait_timeout is 28800 which is the default one, and interactive_waitimeout is also 28800.

But I can see more than the default value.

enter image description here

  • I wonder if there is a "keep-alive" ping of some sort. Do you have some form of "connection pooling"? – Rick James Jun 9 '17 at 0:09
1

Ah! This one could be application framework has the value passed at the time of creating connection to DBs to set wait_timeout or interactive_timeout for their session level, this overrides default mysql settings.

If you enable general log on any test environment and have their application to point to that DB. You will find wait_timeout or interactive_timeout setting such values.

Short Term Fix:

  • You might consider killing connections that are more than 500secs in sleep state as a cron running every minute.

Permenant Fix:

  • Have application team to fix their code, by not to pass any default values to DB.
  • Once app is fixed, remove the cron that kills every minute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.