Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116762 - courier-authlib spits the message "Mysql has gone away!" with mysql-5*
Summary: courier-authlib spits the message "Mysql has gone away!" with mysql-5*
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Luca Longinotti (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-26 02:30 UTC by manolis
Modified: 2007-04-08 14:46 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description manolis 2005-12-26 02:30:40 UTC
I have a qmail server wich authenticates with vchkpwd (vpopmail) and mysql the mail accounts...
From time to time I get a mail user login failure for my email users, although mysql still runs fine, and ofcourse I can login with "telnet 127.0.0.1 110". The problem goes away without any further effort after some time, and reappears again...
I searched thoroughfully on some forums, and found out that this behaviour has appeared when mysql started to use threads. Of course in mysql-5.0.17 I use, there is no use flag to deactivate the use of threads. Is this possible with mysql 5.x.x? Can mysql 5.x.x be compiled without the use of threads?
If the answer is yes, it would be a workaround, until the vpopmail-courierauthlib developpers fix the multithread issues...
Comment 1 Francesco R. (RETIRED) gentoo-dev 2005-12-28 11:39:53 UTC
To start a single threaded MySQL add "one-thread" to your my.cnf

But this can only be a "test", sure not a production server (IMHO).

If the error is still reproducible mind to re-emerge with "debug" use flag and to  follow the upstream instruction on debugging the server.

http://dev.mysql.com/doc/refman/5.0/en/debugging-server.html





Comment 2 manolis 2006-01-12 01:42:03 UTC
I found a workaround to this issue...
If I change in /etc/courier/authlib/authdaemonrc the line:
daemons=5 
to :
daemons=1
the problem dissappears... 
Ofcourse I have too few vpop users, so I cannot tell if that affects the login when there are thousands of users.
Comment 3 manolis 2006-01-20 01:40:27 UTC
after 15 days with my workaround... it works fine...
Does the workaround counts as a fix?
I have to mark the bug as resolved? Or no?
Comment 4 fidel 2006-04-14 00:31:01 UTC
(In reply to comment #3)
> after 15 days with my workaround... it works fine...
> Does the workaround counts as a fix?
> I have to mark the bug as resolved? Or no?
> 
This "solution" works just fine for me on a x86 machine, but on my amd64 server this does not change anything concerning this error message. I still get the error that MySQL has gone away. I need to restart courier-authlib in order to get logins to work again. Either way, I can start more authdaemon-instances or less, just the same: 
[authdaemond] vmysql: sql error[3]: MySQL server has gone away
I use MySQL 5.0.19-r1 though, don't know if the problem is related to that. On the machine I use nptl, but no threads and no ithreads (use-flags). Starting mysql with one-thread doesn't work here, mysql refuses to start.
Comment 5 manolis 2006-04-14 05:00:12 UTC
Strange here (amd64) works fine.. mysql starts multithreaded... 

(In reply to comment #4)
> (In reply to comment #3)
> > after 15 days with my workaround... it works fine...
> > Does the workaround counts as a fix?
> > I have to mark the bug as resolved? Or no?
> > 
> This "solution" works just fine for me on a x86 machine, but on my amd64 server
> this does not change anything concerning this error message. I still get the
> error that MySQL has gone away. I need to restart courier-authlib in order to
> get logins to work again. Either way, I can start more authdaemon-instances or
> less, just the same: 
> [authdaemond] vmysql: sql error[3]: MySQL server has gone away
> I use MySQL 5.0.19-r1 though, don't know if the problem is related to that. On
> the machine I use nptl, but no threads and no ithreads (use-flags). Starting
> mysql with one-thread doesn't work here, mysql refuses to start.
> 
Comment 6 fidel 2006-04-23 02:19:19 UTC
.. I use nptl, but no threads and no ithreads (use-flags). Starting
> > mysql with one-thread doesn't work here, mysql refuses to start.
> > 
> 
I switched to -nptl, same thing! On my AMD64 Server there is no difference using 0, 1 or 5 daemons in authdaemonrc, I need to restart courier-authlib!
Since under those circumstances this can't be considered as a "solution", I might need to consider dropping the use of vpopmail!?...
Comment 7 Ian Brandt 2006-05-21 11:55:20 UTC
I can confirm that daemons=1 didn't help me.  It does seem to beat the issue if I leave my mail client running, which checks for mail every minute.

dev-db/mysql-5.0.21
net-mail/vpopmail-5.4.16
net-libs/courier-authlib-0.58
Comment 8 Andreas Westin 2006-10-16 04:48:48 UTC
Any news on this issue ?

I have the same problem, I've just changed the daemons=1 to see if it solves the problem.

net-mail/vpopmail-5.4.17
net-libs/courier-authlib-0.58
dev-db/mysql-5.0.26
Comment 9 Andreas Westin 2006-10-17 03:11:16 UTC
daemons=1 didn't help me.
Comment 10 Charlie Shepherd (RETIRED) gentoo-dev 2007-02-03 20:49:24 UTC
Is this fixed with courier-authlib-0.59.1?
Comment 11 Luca Longinotti (RETIRED) gentoo-dev 2007-04-08 14:35:21 UTC
Please test with net-libs/courier-authlib-0.59.2, this issue happens randomly with various MySQL using packages... I've had it myself with amavisd-new and others at times, then it just disappears or is fixed by increasing the mysql connection timeout, never was able to pinpoint where the problem really was... :( courier-authlib always worked for me though, can't reproduce this.
Best regards, CHTEKK.