I've had this issue before and on occasion is raises its head and it tends to disappear but Friday was extremely bad and it's not showing signs of abating.
The situation is that dbmail reports "Thread is having trouble obtaining a database connection" and eventually dbmail becomes unresponsive to new connections and my script which checks for a good connection every 5 minutes then eventually kills/restarts dbmail. >From the dbmail.log May 31 14:56:05 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [0] May 31 14:56:16 cwagate last message repeated 11 times May 31 14:56:21 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [5] May 31 14:56:26 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [10] May 31 14:56:31 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [15] May 31 14:56:36 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [20] May 31 14:56:41 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [25] May 31 14:56:46 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [30] May 31 14:56:51 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [35] May 31 14:56:56 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [40] May 31 14:57:01 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [45] May 31 14:57:06 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [50] May 31 14:57:11 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [55] May 31 14:57:16 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [60] May 31 14:57:21 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [65] May 31 14:57:26 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [70] May 31 14:57:31 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [75] May 31 14:57:36 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [80] May 31 14:57:41 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [85] May 31 14:57:43 cwagate dbmail/imap4d[20924]: Alert:[db] db_con_get(+254): Thread is having trouble obtaining a database connection. Try [0] The message repeats the last 0 message over and over before the script kicks in and restarts dbmail. May 31 15:00:21 cwagate kernel: pid 20924 (dbmail-imapd), uid 65534: exited on signal 6 Just before the script killed dbmail the vmstat output was (i.e idle cpu) procs memory page disks faults cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 r b w avm fre flt re pi po fr sr ad8 ad10 in sy cs us sy id us sy id us sy id us sy id us sy id us sy id us sy id us sy id 0 0 0 9186008 8419336 362 0 0 0 1008 0 0 0 655 291 954 0 0 99 0 1 99 1 0 99 1 0 99 0 0 99 0 0 99 0 0 99 0 0 100 What I've noticed this time is that after restarting there is a build up of threads in mysql reporting state null and info commit. (thread# are low as in desperation I restarted mysql last night). +------+---------------+-----------------+---------------+-------------+---- ---+----------------------------------------------------------------+------- -----------+ |Id|User|Host|db|Command|Time|State|Info| +------+---------------+-----------------+---------------+-------------+---- ---+----------------------------------------------------------------+------- -----------+ |6|dbmail|newgate:62714|dbmail|Sleep|28||| |9|dbmail|localhost|dbmail|Sleep|3||| |10||newgate:15404||BinlogDump|58045|Hassentallbinlogtoslave;waitingforbinlo gtobeupdated|| |242|dbmail|newgate:33803|dbmail|Sleep|5272||| |3824|root|localhost||Sleep|11988||| |5093|dbmail|localhost|dbmail|Query|0||COMMIT| |5094|dbmail|localhost|dbmail|Query|0||COMMIT| |5095|dbmail|localhost|dbmail|Query|0||COMMIT| |5096|dbmail|localhost|dbmail|Query|1||COMMIT| |5097|dbmail|localhost|dbmail|Query|0||COMMIT| |5116|dbmail|localhost|dbmail|Query|0||COMMIT| |5118|dbmail|localhost|dbmail|Query|0||COMMIT| |5121|dbmail|localhost|dbmail|Query|0||COMMIT| |5122|dbmail|localhost|dbmail|Query|0||COMMIT| |5177|dbmail|localhost|dbmail|Query|0||COMMIT| |5178|dbmail|localhost|dbmail|Query|1||COMMIT| |5179|dbmail|localhost|dbmail|Query|0||COMMIT| |5180|dbmail|localhost|dbmail|Query|1||COMMIT| |5219|dbmail|localhost|dbmail|Query|0||COMMIT| |5248|dbmail|localhost|dbmail|Query|0||COMMIT| |5249|dbmail|localhost|dbmail|Query|0||COMMIT| |5250|dbmail|localhost|dbmail|Query|1||COMMIT| |5304|dbmail|localhost|dbmail|Query|0||COMMIT| |5305|dbmail|localhost|dbmail|Query|0||COMMIT| |5306|dbmail|localhost|dbmail|Query|0||COMMIT| |5307|dbmail|localhost|dbmail|Query|0||COMMIT| |5308|dbmail|localhost|dbmail|Query|0||COMMIT| |5309|dbmail|localhost|dbmail|Query|0||COMMIT| |5310|dbmail|localhost|dbmail|Query|0||COMMIT| |5359|dbmail|localhost|dbmail|Query|0||COMMIT| |5360|dbmail|localhost|dbmail|Query|0||COMMIT| |5362|dbmail|localhost|dbmail|Query|0||COMMIT| |5363|dbmail|localhost|dbmail|Query|0||COMMIT| |5364|dbmail|localhost|dbmail|Query|0||COMMIT| |5365|dbmail|localhost|dbmail|Query|1||COMMIT| |5366|dbmail|localhost|dbmail|Query|0||COMMIT| |5563|dbmail|localhost|dbmail|Query|0||COMMIT| |5647|dbmail|localhost|dbmail|Query|0||COMMIT| |5649|dbmail|localhost|dbmail|Query|0||COMMIT| |5651|dbmail|localhost|dbmail|Sleep|1||| |5791|roundcubemail|localhost|roundcubemail|Sleep|90||| |5854|root|localhost||Query|0||showprocesslist| Does anyone have any ideas what might be causing this and how to avoid it? The server is FreeBSD 8.1, mysql 5.1.x. My dbmail.conf max_db_connections = 35 but I've tried 10 and 20 too to no avail. Regards Daniel Schütze _______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
