Amavisd cant fork with a lot of emails

Antonio Gutiérrez Mayoral agutierr at gmail.com
Fri Feb 24 12:27:49 CET 2012


I think that the problem is exactly that, also. I have only 1,5 GB of swap
space, and 4 GB of ram. When this problem occurs, the RAM goes down to 1 GB
free and swap about 350 MB :-(

Im going to try increasing the swap space and observe the server :-). Thank you
so much for your advice.

Regards.

Antonio.

2012/2/24 Mark Martinec <Mark.Martinec+amavis at ijs.si>:
> Antonio,
>
>> First of all, sorry if this is not the right place to ask this
>> question. We are setting upan antispam server using spamassassin,
>> maia, amavisd-new, etc. All is ok. But, once in a while, we have
>> problems in amavis, when create a new process to check attached data
>> in an email.
>>
>> We are getting an strange message on postfix logs after a while. The
>> message is like that:
>>
>> (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing,
>> id=11968-01-10, mime_decode-1 FAILED: run_command (open pipe):
>>
>> Can't fork at /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/IO/File.pm
>> line 188. at /usr/sbin/amavisd line 1657. (in reply to end of DATA
>> command))  YYYYY <at> foo.bar
>>
>> I am afraid that the problem is there isn't enough resources to
>> allocate a new thread. The message goes to the deferred queue. The
>> problem is, that when its occurs, the deferred queue starts to
>> increase quickly, and the memory goes down quickly also. For this
>> reason I have configured via limits.conf to increase the process on
>> the * account, but it doesnt works:
>>
>> /etc/security/limits.conf
>>
>> *       soft    nofile  65535
>> *       hard    nofile  65535
>> *       soft    nproc   65535
>> *       hard    nproc   65535
>>
>> Amavis is running under the amavis user account. My server is a SLES
>> 11 (virtual running under VMWARE), with 4 GB of ram
>> and 1,5 GB of swap. When I have this problem, the free memory quickly
>> goes down, like the swap. :(((
>>
>> Any ideas? So much thanks.
>
> See man page on fork(2). Besides nproc and MAXPROC limits, the next
> likely cause for failing to fork is that the system run out of
> swap space. My guess is that you hit the swap space exhaution,
> and from then on things can only get worse. Make sure to have
> sufficient swap space. It is common to allocate twice or four times
> the size of RAM to swap.
>
>  Mark



-- 
--
Antonio Gutiérrez Mayoral <agutierr at gmail.com>


More information about the amavis-users mailing list