Bug #19734 wait_timeout server system var seems to be ignored
Submitted: 11 May 2006 17:22 Modified: 12 Jun 2006 16:32
Reporter: Sascha Ottolski Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S5 (Performance)
Version:5.0.18 OS:Linux (Debian Linux 2.6.8-net3)
Assigned to: CPU Architecture:Any

[11 May 2006 17:22] Sascha Ottolski
Description:
Even though our mysql database is configured with the following values for wait_timeout and interactive_timeout

(extract from my.cnf)

wait_timeout=900
interactive_timeout=900

we see many connections staying in SLEEP mode much longer.

(extract from SHOW VARIABLES)

interactive_timeout 900 
wait_timeout 900 

(extract from SHOW PROCESSLIST)

1667067   app   app12.xyz.de:58622   user1   Sleep   49036   ---   ---  
1671232   app   app12.xyz.de:58693   user1   Sleep   49036   ---   ---  

Those connections obviously do not get terminated and thus consume a large amount of our max_connections limit. Connecting application server are either PHP or Java, so I doubt that these problems are related to client side connection pool settings.

How to repeat:
Unfortunately I can't supply you with a step-by-step instruction. Some hints: Our master database server is configured to handle 2000 connections and consumes during peak load up to 1900. Almost 20 application servers are connecting to the machine (PHP, Java). On average we see dozens of idle connections for each application server.

Suggested fix:
-
[12 May 2006 12:54] Valeriy Kravchuk
Thank you for a problem report. As it is Debian, please, specify the exact version of glibc used. Is it all happens on AMD64?
[12 May 2006 13:01] Sascha Ottolski
We are using:

libstdc++2.10-glibc2.2  on our Debian Sarge systems.

Our  master database server is equipped with

2x Intel Xeon 3,20 GHz processors

Hope, this helps.
[12 May 2006 13:04] Valeriy Kravchuk
Please, send the results of the following commands:

getconf GNU_LIBPTHREAD_VERSION
getconf GNU_LIBC_VERSION
[12 May 2006 13:37] Sascha Ottolski
Hi Valeriy,

ok, sorry. Here we go:

stf-db7:~# getconf GNU_LIBPTHREAD_VERSION
NPTL 0.60
stf-db7:~# getconf GNU_LIBC_VERSION
glibc 2.3.2
stf-db7:~#
[12 May 2006 16:32] Valeriy Kravchuk
That are too old (and buggy) to expect stabil behaviour. Look, I have here (on old SuSE 9.3):

openxs@suse:~/dbs/5.0> getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.4
openxs@suse:~/dbs/5.0> getconf GNU_LIBC_VERSION
glibc 2.3.4

So, please, upgrade glibc to 2.3.5 at least, then try to repeat the behaviour you described.
[12 May 2006 16:32] Valeriy Kravchuk
Or try to use MySQL's static builds of 5.0.21.
[12 Jun 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".