Amavis 100%

Cedric Knight cedric at gn.apc.org
Tue Jun 13 13:30:00 CEST 2017


On 08/06/17 19:59, Curtis NPC wrote:
> Ok, I was premature in that. I was worried that several amavis processes
> were going to start up again.
> Eventually that process that I described disappeared. But I wonder why
> it was taking so long (5-10 minutes) and so much CPU?

It's hard to know without more investigation, but here are some generic
thoughts.  If it happens again I'd start with something like:
  strace -p 11101
for clues; maybe lsof -p 11101; look first in the logs for ch7-11101-07,
then in the amavis temporary files for that message (might possibly
still be in /var/lib/amavis/tmp/ if you used kill -9); and resort to gdb
if it's running and still a mystery.

$log_level = 2;
may help if you're seeing a lot of slow emails as you can look for
TIMING lines.  Also amavisd-nanny.

One possibility is a combinatorial explosion if you are using your own
SpamAssassin rules - look for any regex with more than one .* (in fact,
it's good to replace any .* with .{n,m}).   This is presuming these are
temporary CPU spikes and not a generally overloaded system.

CK

> 
> On 2017-06-08 18:38:30 +0000, Curtis NPC said:
> 
>> Now I've noticed that amavis is taking up 100% of the CPU. In fact
>> just a few minutes ago I had several amavis processes running at the
>> same time, all sucking up resources.
>> I had to stop all mail related services. Kill -9 on all amavis
>> processes and then restart them all. Things were calm for a while, but
>> now....
>>
>> Any ideas why this happening.
>>
>> Here's what I get on the process:
>>
>> 11082 ?        Ss     0:00 /usr/sbin/amavisd-new (master)
>> 11101 ?        R     10:26 /usr/sbin/amavisd-new (ch7-11101-07-9)
>> 11529 ?        S      0:00 smtp -n smtp-amavis -t unix -u -c -o
>> smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o
>> disable_dns_lookups=yes -o max_use=20
>> 11566 ?        S      0:04 /usr/sbin/amavisd-new (ch13-avail)
>> 11697 ?        S      0:00 smtp -n smtp-amavis -t unix -u -c -o
>> smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o
>> disable_dns_lookups=yes -o max_use=20
>>
>> Top shows thtat is is process 11101 that's taking up all the CPU
>>
>> 11101 amavis    20   0  269800 142780   7912 R 100.0  1.8   7:30.26
>> /usr/sbin/amavi
> 


More information about the amavis-users mailing list