[Dovecot] Authentication hanging with 1.0alpha4 - mysql issue?
Hello,
Recently, I configured my server (RHEL4, 2.6.9-22.0.1.ELsmp) to run postfix 2.1.5 and dovecot 1.0 alpha4. It connects to a MySQL database (mysql 4.1.12) to verify authentication. From 30 minutes to an hour after dovecot is started, authentication and mail access works perfectly. However, after those 30 minutes to an hour, further attempts to authenticate with dovecot result in "hangs" - no temporary authentication errors are reported to the client, and no errors are logged to the dovecot log. The dovecot is still running, and responds to connections, but once the password is sent, the server fails to respond. The following line is registered in the log with each authentication attempt after the "hang":
dovecot: Nov 17 22:44:41 Info: auth-worker(default): mysql: Connected to localhost (postfix)
along with an eventual disconnection notice (although no Login: line is registered):
dovecot: Nov 17 22:45:41 Info: imap-login: Disconnected: Inactivity: method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Killing and restarting dovecot immediately fixes the problem, although it reappears after 30 minutes to an hour.
Following is my dovecot-sql.conf:
driver = mysql connect = host=localhost dbname=postfix user=dovecot_read password=**obfuscated** default_pass_scheme = PLAIN-MD5 password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT 89 AS uid, 89 AS gid FROM mailbox WHERE username = '%u'
(dovecot_read has SELECT access on the postfix database, and 89 is the uid/gid of the owner of the maildirs.)
I searched through this list's archives over the last two months and couldn't find anything related to this. Does anyone have any idea what the problem could be?
Regards and many thanks in advance.
Thus spake brock@theskeptik.com, on Thu, Nov 17, 2005 at 11:18:38PM -0600:
Killing and restarting dovecot immediately fixes the problem, although it reappears after 30 minutes to an hour. I'm seeing the same problem - the only thing I can relate it to is a timeout in MySQL. Since having a client checking every minute will prevent this from ever happening. But standing around being idle will eventually make Dovecot hang.
Strangely enough though, the PAM auth just keeps on running (I have both configured).
I've tried toying around with different values for timeout in MySQL, but to little avail, nothing seems to be doing the trick.
I'm currently running on FreeBSD 6.0 with a MySQL 5.0. But have seen the exact same symptomes under 5.4 with mysql 4.X - so I'm guessing it is a "keepalive" handler that gets screwed somehow.
Not much I can do to help you there, but at least there are someone else with the same problem ;-)
Friendly Greetings S. P. Skou
-- GPG Key: 8E58ACB3
participants (2)
-
brock@theskeptik.com
-
Søren P. Skou