qmailscanner chewing up all memory and crashing

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
humpy
Forum User
Forum User
Posts: 23
Joined: Mon Jul 16, 2007 12:34 pm

qmailscanner chewing up all memory and crashing

Unread post by humpy »

Hi I have been running clam+ qmailscanner+ spamassassin on a plesk cvps with 512 ram pretty much fine. Ram often got a bit tight, but 99% of the time was ok. Suddenly this morning i find qscand spawning 20 processes at once , eating up all ram , and then dying . Mail traffic looks normal , nothing heavier than normal. I am at a loss at how to troubleshoot this, any pointer gratefully recieved.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

You just got a lot of mail all at once. You can set xinetd to throttle check this out:

http://www.atomicorp.com/wiki/index.php ... iting_Load
Kalimari
Forum Regular
Forum Regular
Posts: 526
Joined: Wed Jan 02, 2008 3:21 pm
Location: United Kingdom

Unread post by Kalimari »

INFO: Custom alterations to /etc/xinetd.d/smtp_psa are retained when updating mail settings using Plesk Server-wide mail preferences.
humpy
Forum User
Forum User
Posts: 23
Joined: Mon Jul 16, 2007 12:34 pm

Unread post by humpy »

hi, thansk for the tips, i have set the connection to 5 max in xinetd, and source 2... except 24 hrs later its still showing all slots jammed 24/7.. tailing maillog doesnt seem to be showing more than average actual traffic.
I am going to change that to 3 and 1 in hopes it improves things
netstat doesnt seem to show anything too weird that i can tell,, top just shows the below without any change.. whereas it used to vary, in connections constantly. and memory is still getting chewed up badly
and killing services
this server ( normally ) has a fairly light mail load,
Any other ideas on what to do?

30162 qscand 18 0 8740 5832 2000 S 3 1.1 0:00.09 perl5.8.8
24263 qscand 18 0 8736 5828 2000 S 0 1.1 0:00.09 perl5.8.8
25963 qscand 18 0 8736 5828 2000 S 0 1.1 0:00.09 perl5.8.8
26228 qscand 18 0 8736 5828 2000 S 0 1.1 0:00.09 perl5.8.8
26385 qscand 19 0 8736 5828 2000 S 0 1.1 0:00.09 perl5.8.8
23737 qscand 19 0 8732 5824 2000 S 0 1.1 0:00.10 perl5.8.8
26111 qscand 17 0 8732 5824 2000 S 0 1.1 0:00.10 perl5.8.8
28670 qscand 18 0 8732 5824 2000 S 0 1.1 0:00.09 perl5.8.8

30127 qmaild 17 0 4684 1876 1556 S 0 0.4 0:00.03 qmail-smtpd
23710 qmaild 18 0 4680 1872 1556 S 0 0.4 0:00.04 qmail-smtpd
26214 qmaild 17 0 4680 1872 1556 S 0 0.4 0:00.04 qmail-smtpd
26383 qmaild 18 0 4684 1872 1556 S 0 0.4 0:00.04 qmail-smtpd
28367 qmaild 15 0 4680 1872 1556 S 0 0.4 0:00.04 qmail-smtpd
24211 qmaild 17 0 4676 1868 1556 S 0 0.4 0:00.03 qmail-smtpd
25949 qmaild 17 0 4680 1868 1552 S 0 0.4 0:00.03 qmail-smtpd
27711 qmaild 17 0 4676 1868 1556 S 0 0.4 0:00.03 qmail-smtpd
26078 qmaild 16 0 4680 1848 1536 S 0 0.4 0:00.03 qmail-smtpd
28082 qmaild 15 0 4680 1848 1532 S 0 0.4 0:00.03 qmail-smtpd
27939 qmaild 16 0 4680 1824 1512 S 0 0.3 0:00.02 qmail-smtpd
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

You could set up a dedicated box as an Project Gamera anti-spam/anti-virus filter.
humpy
Forum User
Forum User
Posts: 23
Joined: Mon Jul 16, 2007 12:34 pm

Unread post by humpy »

I would love to do that , except the cost involved means that I would be going backwards every month, the current server incom wont cover it until I get more clients :(.
Now that i have limited the smtp to 4 and 1, the memory is holding at 450 mb, and is stable.
However, when traffic levels rise tomorrow (eg monday mid-morning) what effect would this have on users? will they see apparent intermittent server errors /timeouts when there are no slots free?

When I first set the limits, qmail was intermittently showing as not running in Plesk, but would restart ok, now it is showing as permanently not running, and wont restart ( in plesk) even tho it IS actaully running and mail is being sent. I am thinking that for some reason that Qmail has for some reason become totally ***ed and needs a reinstall from scratch perhaps.

Advice as to what packages to remove ( and in what order if important) and re-install to do this would be greatly appreciated., expecially any tips on not losing current settings, or what conf files would be needing to backed up at least , so that I can more easily return things back to normal. ( smtp_psa being one such file,).. :)

I recall losing all individual spam level settings once when i reinstalled SA, and it was a time consuming pain manually setting them all up again in plesk, any tips to avoid such a mishap would be great.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

It sounds to me like you've reached the capacity of the system. Can you increase resources?
humpy
Forum User
Forum User
Posts: 23
Joined: Mon Jul 16, 2007 12:34 pm

Unread post by humpy »

Hi scott.
thanks for advice, same tproblem, upfrading to next level costs too much. Also this server has been running fine with the settings it has had for the last year. It has been close to memory limits running clamav and qmailscanner on top of basics, but until several days ago it was fine. then its has just started this mad memory gobbling behaviour with qmail smtp..
.. traffic has not increased at all, or any other reason why this should happen :(
humpy
Forum User
Forum User
Posts: 23
Joined: Mon Jul 16, 2007 12:34 pm

Unread post by humpy »

well, decided to take bull by the horns and uninstalled and reinstalled all qmail associated packages. So far so good, it seems to be running a lot better. only using 400mb of ram with default settings now...Mind you its 4am here so quietest time of day for email, but with this ealier problem, it was still maxing out ram at 4am.. crossing fingers it stays that way :)
humpy
Forum User
Forum User
Posts: 23
Joined: Mon Jul 16, 2007 12:34 pm

Unread post by humpy »

SOLVED!!!!
Was informed last night that by the NOC who host my VPS that the actual problem was a synfloof from a load of idiots somehere in choina by the look of it. Soon as that was manged to be filtered out, the server has returned to normal, and because of the basic qmail install, i now have scads of free memory.. makes me ponder whether to put clam av back in , as that was actaully using nearly 50% of all memory resources...
any one have suggestion on how to maybe put it back but witha "lighter" config, that may not get all viruses, but not use much memory either.. ie , what would be a good choice for max effective detections, for minimum enabled options..?
AntiochInteractive
Forum User
Forum User
Posts: 35
Joined: Thu Jan 08, 2009 4:31 am
Location: Fort Worth, TX
Contact:

Get a New Server

Unread post by AntiochInteractive »

Humpy - I want to not sound rude in any way, but from my experience, a server with 512MB of RAM and a decent economy processor - like a Celeron - will work fine as a web server, but the moment you have spamassassin running, you're going to start taxing the server.

I had a Root Server I and III from 1and1.com a few years back. My Root Server I was underpowered, but I kept its load very low. My Root Server III was a 2.8Ghz single core processor with 1GB of RAM and even that started to get overwhelmed at times.

It's good to review your qmail-queue.log files to make sure that something isn't messed up.

It wasn't apparent to me originally, but editing /etc/qmail-scanner.ini and then running 'qmail-scanner-reconfigure' to apply the changes is the proper way to configure this. I was editing the actual perl file and was quite irritated that a new install overwrote my changes.

On my system, there were some errors caused by 'settings_per_domain' being active by default, which I had to disable.

But honestly, at this point, I'm not sure what you are paying for your VPS, but I'm pretty certain that the price difference between that a much more powerful server would be minor. I'd say that 1AND1.COM is still a good place to go -- they didn't have a solution for upgrading my PLESK Cert from 100 users to 300, so I swapped to dedicentral.com where I have a VERY powerful server that allowed me to consolodate my two servers and still have more processing power at my disposal to lighten the load on even the worst spam floods.
Post Reply