Stephen Gran <[EMAIL PROTECTED]> writes:

> This one time, at band camp, Simon Josefsson said:
>> Hi.  I'm using clamav-milter on a pretty busy mail server that uses
>> sendmail (from debian, 8.13.3-6).  We have run 'testing' for a long
>> time, and it has worked well until recently (perhaps a few weeks at
>> most).  Sometimes, in the syslog I get these:
>> 
>> Feb 25 23:47:53 yxa sm-mta[9481]: j1PMhp23009481: Milter (clamav): timeout 
>> before data read
>> Feb 25 23:47:53 yxa sm-mta[9481]: j1PMhp23009481: Milter (clamav): to error 
>> state
>> 
>> And when this happen, I have tons of clamav-milter processes running:
>> yxa-iv:~# ps auxww|grep clama|wc -l
>> 196
>>
>> MaxThreads 12
>> MaxConnectionQueueLength 15
>
> You have hit MaxThreads/MaxConnectionQueueLength limit.
>
> The way this works is there are so many threads (12 in your case),
> and they each have a queue of requests waiting (15 for you).  They each
> allow MaxConnectionQueueLength of requests to wait before denying any
> additional.  So you can have 12 x 15, or 180 clamav-milter requests
> hanging around.  196 is over that, so 16 threads timeout waiting for
> a response.
>
> Some experimentation is probably necessary to figure out the ideal for
> your system, but generally, more threads = more system load, while bigger
> queue = longer wait times.  If you have a really fast processor and a
> relatively loaded system, you might get this under control by upping
> the MaxConnectionQueueLength.  If you have a system where load is not
> much of an issue, try upping MaxThreads.  My usual first try is upping
> MaxThreads, as that processes requests fastest.  It does bring some load
> problems with it, though, which is why I mention MaxConnectionQueueLength.
>
> This does not sound like a bug to me, so much as a need for performance
> tuning.  If you agree, I would like to close this.  If I misunderstood,
> please let me know what I didn't understand and we can work to fix it.
>
> Hope that helps, and if you need more help with performance tuning,
> please try either the documentation, clamav-users@lists.clamav.net,
> #clamav on IRC, or myself.
>
> Take care, and thanks for reporting,

Thanks for quick response!  I've changed the numbers to 30/20, I'll
see if it helps.

Is this documented in a FAQ somewhere?  I searched briefly before
reporting, but didn't locate anything useful.  I think the problem
here is finding out that the error message really meant that a soft
limit was reached, that could be fixed by modifying the configuration.

Closing the report is fine by me.

Thanks,
Simon


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

Reply via email to