Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] "milter-greylist: greylist: thread_create() failed: 12" errors

2007-09-26 by Johann Klasek

On Wed, Sep 26, 2007 at 10:14:10AM -0000, marknreynolds wrote:
[..]
> 
> I am not a programmer, however I have been logging the number of
> threads milter-greylist is creating and have seen it go up to 290. If
> I run pmap on the process I can see each thread is taking 8M of memory
> so by the time I multiply 8M by 290 and add on the size of the
> greylist database (around 300MB) I am starting to approach 3GB which I
> believe is the limit for user space memory within a process. 
> 
> I am currently waiting for the next errors so I can confirm how many
> threads were open at the time.
> 
> Have I hit a physical limit or is there any tuning I can carry out to
> prevent the problem re-occuring?

I had a similar problem (in some other context). Running a system with
Linux FC5 I saw an overall consumption of at least 10M for each thread,
filling up the virtual memory of the thread container process which is
limited to 3 (or 2?) GB. Some investigation showed that the default
process stacksize is taken for each(!) new thread ... Now I have limited
the stack size in the init script using

ulimit -s 256

to 256 KB which worked for me (e.g. Solaris is not that wastful in
stack usage for threads).


Johann

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.