[Mimedefang] MySQL Greylisting - server has gone away

Mack roaringpenguin.com at bass-speaker.com
Fri Apr 8 06:21:46 EDT 2005


I've seen this, and it would appear that the perl DBD drops the connection, but still thinks it's alive and throws an error. 

I ended up re-creating the connection (which is a pain) at the start of every function. it does stop prepped sql statements etc. but does resolve the issue.


-----Original Message-----
From: mimedefang-bounces at lists.roaringpenguin.com
[mailto:mimedefang-bounces at lists.roaringpenguin.com]On Behalf Of Paul
Murphy
Sent: Friday 08 April 2005 11:12
To: mimedefang at lists.roaringpenguin.com
Subject: [Mimedefang] MySQL Greylisting - server has gone away


Hi,

I've been getting problems with my filter dropping its MySQL connection
occasionally, which means that incoming mail fails during the greylist check -
effectively, it is forced to try again, since the Sendmail session sends
"reject=451 4.7.1 Please try again later" as a result of the slave dying.

I vaguely remember someone else commenting on this previously, but with no
resolution.

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:

sub filter_initialize()       
{
require ("/etc/mail/greylist-msql/mimedefang-filter-greylist");
}

However, we don't drop the connection in a filter_cleanup() call, assuming that
Perl will take care of that for us.  Is this part of the problem?

We are using MD 2.43 (yes, I know I should upgrade), with embedded Perl 5.8.4,
on Debian.


Best Wishes,

Paul.
__________________________________________________
Paul Murphy
Head of Informatics
Ionix Pharmaceuticals Ltd
418 Science Park, Cambridge, CB4 0PA

Tel. 01223 433741
Fax. 01223 433788

_______________________________________________________________________
DISCLAIMER:
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to which they
are addressed.  If you have received this email in error please contact
the sender or the Ionix IT Helpdesk on +44 (0) 1223 433741
_______________________________________________________________________ 


This Email Has Been Anti-Virus Scanned





More information about the MIMEDefang mailing list