On 7/13/2012 12:01 PM, Michael Orlitzky wrote: > On 07/13/12 12:22, Noel Jones wrote: >>> >>> $max_servers = 100; >>> $max_requests = 25; >>> $child_timeout = 180; >>> $smtpd_timeout = 120; >>> >> >> >> I suspect 100 smtpd/amavisd processes is way too many for your >> hardware, preventing amavisd from responding before a timeout occurs. >> >> Reduce smtpd process count and amavisd $max_servers until you stop >> having timeouts. >> >> Typical values are 3 to 10 times the number of CPUs you have, and >> enough RAM to support them with no swapping. >> > > I should have mentioned this, but the first time this happened, I > assumed it was because we had too few amavis processes. I think I raised > it from 25 -> 50 -> 100 to see if it made any difference (it hasn't).
This suggests that 25 is too many. Rule of thumb -- if you're getting timeouts under heavy load, that means you're accepting more connections than your box can handle in a timely manner. > I'll lower it back to 40 (this is a decent-sized server) to limit the > number of variables. As a general rule, you can use somewhere between 3 to 10 amavisd-new processes per CPU, but you must have enough RAM to support that number; there must be no swapping. -- Noel Jones