Re: Excessive threads in opendkim-2.2.2 on Solaris 10

From: Gary Mills <mills_at_cc.umanitoba.ca>
Date: Wed, 26 Jan 2011 08:34:32 -0600

On Wed, Jan 26, 2011 at 10:58:39AM +0100, Jose-Marcio Martins da Cruz wrote:
> Murray S. Kucherawy wrote:
> >
> >This again shows thread exhaustion. It appears to be caused by the
> >asynchronous resolver becoming wedged, meaning jobs that need DNS
> >answers are timing out waiting for them; enough of a backlog of these
> >forms that no more threads can be allocated (libmilter creates a thread
> >per SMTP client) and eventually exits the entire process when it fails
> >to do so enough times.
>
> One workaround is the libmilter with a pool of workers. Libmilter creates a
> small number of threads at start-up and allocates a thread to handle one
> sendmail command, instead of creating one thread per SMTP client. This
> means a new thread will be created only it the filter effectively need a
> new thread to handle a sendmail command, not a new SMTP client.

Is this feature recommended for opendkim?

> To use this alternative model, you need just to recompile the libmilter and
> enable this feature :
>
> APPENDDEF(`conf_libmilter_ENVDEF',`-D_FFR_WORKER_MODEL')

There's a symbol `_FFR_WORKERS_POOL' in sendmail's libmilter
directory. Is that it? I don't see any documentation for it.

> APPENDDEF(`conf_libmilter_ENVDEF',`-D_FFR_USE_POLL')
>
> The second line will replace all select calls inside libmilter (libmilter,
> not the filter), by poll.

We've been doing that since sendmail-8.12.11. For more recent
versions, it's done this way:

    APPENDDEF(`conf_libmilter_ENVDEF', `-DSM_CONF_POLL')

-- 
-Gary Mills-        -Unix Group-        -Computer and Network Services-
Received on Wed Jan 26 2011 - 14:34:46 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:33:08 PST