[Dovecot] MySql Server Has gone

Timo Sirainen tss at iki.fi
Mon Feb 20 19:23:38 EET 2006


On Mon, 2006-02-20 at 11:59 -0500, Marc-André Joyal wrote:
> Hi,
> 	I'm running Dovecot v. 0.99.14 without any problems except this one: It seems 
> that Dovecot loses the connection with MySQl after a certain amount of time and I got 
> this message in /var/log/maillog:
> Feb 19 09:37:14 localhost dovecot-auth: MySQL: Error executing query "SELECT userpassword FROM 
> virtual_users WHERE username = 'bob'": MySQL server has gone away
> 
> I looked in the MySql docs and, by default, after 8 hours of inactivity, the Mysql 
> server closes the connection with the client (and it's probably this that causes the 
> error above).
> 
> So, I know that I can change the wait_timeout option in MySql but is there a way to 
> specify an unlimited time connection only from Dovecot to MySql? 

As far as I know, it's not possible. But if you upgraded to 1.0betas,
Dovecot would reconnect and retry the query automatically.

> And by the way, what's 
> exactly the purpose of Dovecot's db_client_flags option? Would it be possible to specify 
> the timeout via this option?

They're listed here:

http://dev.mysql.com/doc/refman/5.0/en/mysql-real-connect.html

The parameter is there just in case someone would want to change it, but
it's rarely wanted..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20060220/1c705492/attachment.pgp


More information about the dovecot mailing list