----- Original Message ----- From: "Paul Murphy" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, April 08, 2005 5:12 AM
Subject: [Mimedefang] MySQL Greylisting - server has gone away



Having looked into it again in more detail, I've discovered what appears to be
an interesting correlation. We reap our slaves after 200 requests are
processed, which for us means that each slave runs for 8-14 hours of real time
as our volumes are low. What appears to be happening is that the normal reap of
one slave causes a different slave to lose its database connection. The
attached log extract showing slave events provides some support for this,
although the time between reap of slave A and death of slave B is highly
dependent on mail volume. The greylisting code is also attached for info.


My theory is that the cleanup code for reaping a slave is somehow taking out the
wrong database connection handle. Does this make sense? We initialise the
connection in filter_initialize:

Use connect_cached() and call it just before calling your greylisting code, rather than once in filter_initialize(). Read the manpage for DBI for more details, but it works great.


Be nice to MySQL and do "$dbh->disconnect() if $dbh;" in filter_cleanup().

I'm occasionally seeing unexpected disconnects from MySQL in my filters and this handles makes it a total non-problem.

Chris Myers
Networks By Design


_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to