[Pymilter] python segfaults under heavy load

Stuart D. Gathman stuart at bmsi.com
Thu Jan 18 12:58:11 EST 2007


On Thu, 18 Jan 2007, Roman Bogorodskiy wrote:

> I'm implementing greylist milter based on py-milter and mysql as a
> database backend. On my test server (low load) it works like a charm.
> When I install it on a production server under heavy load, it works
> several hours and then python segfaults (there's no traces/errors from
> by app before it). Any suggestions what's wrong? It would be kinda
> boring to rebuild python with debug symbols on a production system,
> maybe that's another way to trace the problem?

Can your production system display the total number of threads active?
Is memory growing without bound on the production system?
Is there a problem with leaking database handles?

A memory leak can be made more obvious on a test system by having milter
module allocate a big block of unused memory for each context.
We did all that many versions ago with a high volume user, and
fixed a leak.  I had 0.8.5 running full tilt (200000 connections / day
on a 450Mhz AMD) recently, so I am not aware of any breakage since then.
Let me check changes to miltermodule.c in CVS...

Other places to suspect a problem are the mysql module, libmilter, or even
(heaven forbid) python itself.  Let's start by getting versions
of mysql python module (mysql version is not as important since python
is crashing), sendmail version that supplied libmilter, and python.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Pymilter mailing list