Andrea Benedetto wrote:
We have a big mail server which authenticate users against mysql (mysql
server 4.1.10 and mysql client 4.1.10).
Some times we can see in /var/log/qmail/smtpd/current this line:

2005-04-04 11:43:50.962470500 vmysql: sql error[3]: MySQL server has gone
away

and after this qmail-server says that the mail box doesn't exists.

We have read that it could be a timeout error, because vpopmail keep alive
conections with mysql server but mysql doesn't (wait_timeout = 28800). But
probably this isn't the case, because in the log file we can see that the
error above doesn't occur every 8 hours but it appears at every time.

Here an example:
2005-04-04 01:30:47.096746500 vmysql: sql error[3]: MySQL server has gone
away
2005-04-04 08:25:35.172402500 vmysql: sql error[3]: MySQL server has gone
away
2005-04-04 08:25:38.270531500 vmysql: sql error[3]: MySQL server has gone
away
2005-04-04 11:45:26.640551500 vmysql: sql error[3]: MySQL server has gone
away
2005-04-04 17:24:29.706105500 vmysql: sql error[3]: MySQL server has gone
away
2005-04-04 19:30:11.903721500 vmysql: sql error[3]: MySQL server has gone
away
In other days we haven't any errors.


Some suggestions from prior experience,

Make sure your MySQL server can see DNS for your client (add your clients IP and host name to the /etc/hosts file to avoid DNS issues)

When your mail server says the mySQL server has gone away,
1) check your "Aborted_clients" and "Aborted_connects" values in MYSQL. 2) issue a "flush status" command on the MySQL server and see if connections begin again.
3) check your uptime in mysqladmin, is the SQL server crashing and restarting?


It could be your connection between the MySQL server and the vpopmail server is faulty, bad cat5, bad switch, bad NIC. I've seen these happen before. MySQL doesn't like it's connections being interupted.

DAve





Reply via email to