On Mon, 22 Oct 2012 16:32:24 -0400 "Kevin A. McGrail" <kmcgr...@pccc.com> wrote:
> Anyone have any guidance on settings for -P and -X in order to > maintain persistent DB connections? Yeah, don't. Because it won't work (as you no doubt discovered. :)) You have no idea which slave will handle the ticks. Some slaves might never get a tick. You will have to wrap your DB functions with something that tests the DB connection and reopens it if necessary. The logical place to do that would be right at the beginning of filter_sender, filter_recipient, filter_begin, etc.... whichever callbacks you care about. The logic will be something like: # Assume $dbh is global sub check_db_handle { if (!$dbh->ping()) { # reopen DBH if (!$dbh->ping()) { # AARGH! Tempfail? } } } (Also, SQL client timeouts are totally evil. Don't use them. If your DB can't handle lots of connections, use a connection pooler.) Regards, David. _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang