[Dovecot] MySQL server has gone away

Timo Sirainen tss at iki.fi
Fri Jan 20 19:16:57 EET 2012


On 14.1.2012, at 1.19, Mark Moseley wrote:

>>> Also another idea to avoid them in the first place:
>>> 
>>> service auth-worker {
>>>   idle_kill = 20
>>> }
>> 
>> Ah, set the auth-worker timeout to less than the mysql timeout to
>> prevent a stale mysql connection from ever being used. I'll try that,
>> thanks.
> 
> I gave that a try. Sometimes it seems to kill off the auth-worker but
> not till after a minute or so (with idle_kill = 20). Other times, the
> worker stays around for more like 5 minutes (I gave up watching),
> despite being idle -- and I'm the only person connecting to it, so
> it's definitely idle. Does auth-worker perhaps only wake up every so
> often to check its idle status?

This is fixed in v2.1 hg. The default idle_kill of 60 seconds seems to have gotten rid of the "MySQL server has gone away" errors completely. So I guess the problem was that during some peak times a ton of auth worker processes were created, but afterwards they weren't used until the next peak happened, and then they failed.

http://hg.dovecot.org/dovecot-2.1/rev/3963862a4086
http://hg.dovecot.org/dovecot-2.1/rev/58556a90259f




More information about the dovecot mailing list