Here's a quick fix for greylistd Debian bug #375504.

The problem is that "expireKeys(now)" is performed every time a "check"
is requested.  "expireKeys" uses a brute force algorithm to age out the
entries.  This performs poorly with large lists and high query rates.
Sockets time out and/or the number of waiting sockets accumulate until
the process runs out of descriptors and crashes.

This change has minimal impact on the greylisting process.  The list
entries will still be expired when they are periodically saved to disk.

An alternative fix would be to store sorted lists and process only the
entries that need to be expired.


Steve



--- greylistd.orig      2007-05-13 16:43:34.154312845 -0500
+++ greylistd   2007-05-13 18:58:30.599278789 -0500
@@ -456,7 +456,7 @@
         truthtest = None
 
     now       = int(time())
-    expireKeys(now)
+### expireKeys(now)
     state     = listStatus(key)
 
     if state is None:





----------------------------------------------------------------------
Steven A. Reisman          <[EMAIL PROTECTED]>           P.O. Box 409
Press Enter LLP                                       421 N 2nd Street
715-426-2100 or 651-436-5254                    River Falls, WI  54022
----------------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to