Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 95625 Details for
Bug 126809
net-mail/vpopmail-5.4.13 has mysql connection issues due to mysql threads
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
vpopmail patch to resolve mysql timeout problem
vpopmail-mysql-timeout.patch (text/plain), 1.65 KB, created by
Chris Terry
on 2006-09-01 01:26:54 UTC
(
hide
)
Description:
vpopmail patch to resolve mysql timeout problem
Filename:
MIME Type:
Creator:
Chris Terry
Created:
2006-09-01 01:26:54 UTC
Size:
1.65 KB
patch
obsolete
>--- vmysql.c~ 2006-05-29 10:17:20.000000000 -0400 >+++ vmysql.c 2006-05-29 10:17:20.000000000 -0400 >@@ -465,7 +465,31 @@ > ); > if (mysql_query(&mysql_read,SqlBufRead)) { > fprintf(stderr, "vmysql: sql error[3]: %s\n", mysql_error(&mysql_read)); >- return(NULL); >+ /* Ron Gage - May 29, 2006 - With newer versions of MySQL, there is such a thing >+ as a connection timeout regardless of activity. By default under MySQL 5, this >+ timeout is 28800 seconds (8 hours). If your vpopmail system runs fine for the >+ first 8 hours, then stops authenticating, this timeout is your problem (especially >+ under authdaemond). >+ >+ What this code does is when an error is encountered, it first tries to drop and >+ rebuild a connection to the SQL server and tries again. If this second attempt >+ fails, then something other than the connection timeout is the problem. This fix >+ need to be implemented in other places but in my setup (Slackware 10.2, netqmail, >+ vpopmail, courier-authdaemond, courier-imapd and a few others), this is always where >+ the auth attempt died with a "SQL server has gone away" error. >+ */ >+ >+ fprintf(stderr, "Attempting to rebuild connection to SQL server\n"); >+ vclose(); >+ verrori = 0; >+ if ( (err=vauth_open_read()) != 0 ) { >+ verrori = err; >+ return(NULL); >+ } >+ if (mysql_query(&mysql_read, SqlBufRead)) { >+ fprintf (stderr, "vmysql: connection rebuild failed: %s\n", mysql_error(&mysql_read)); >+ return(NULL); >+ } > } > > if (!(res_read = mysql_store_result(&mysql_read))) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 126809
: 95625