Forums & Blog

A SmarterTools-sponsored community.
Welcome to Forums & Blog Sign in | Join | Help
in Search

Spam Assassin process - spamd.exe - is a huge memory hog

Last post 02-16-2008 3:34 AM by LeaUK. 52 replies.
Page 2 of 4 (53 items) < Previous 1 2 3 4 Next >
Sort Posts: Previous Next
  • 02-27-2007 6:00 AM In reply to

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    My memory usage has slowly gone up to over 500 megs in the last week. If it is just a matter of killing the process couldn't we just schedule something like pskill (http://www.microsoft.com/technet/sysinternals/utilities/pskill.mspx) to kill the process every 48 hours? I know this isn't the best solution but if the windows port of SA has some sort of memory leak until it is fixed this seems like a reasonable solution.

     

     

  • 03-14-2007 1:51 AM In reply to

    • lmst
    • Top 25 Contributor
    • Joined on 03-06-2007
    • Posts 228

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    We have the same problem. I disabled Spam Assassin because of this, but since then the spam has increased.  I could use "kill.exe" to schedual a kill of "spamd.exe" at 4 every morning. I'm not sure if that is enough.

    With Spam Assassin enabled we can have more than 1000 in spool, and it looks like the server isn't able to deliver as fast as they come in. After disabling SA the server delivers very fast and the spool is suddenly normal (<100).

    Hope the next version coming next monday will solve this problem.

    Anyhow thanks for a great product.

    Lars

  • 03-14-2007 7:53 AM In reply to

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    I have had a terrible time with this as well and I am hoping for a solution.  I just upgraded to 4.1 the other day and I have had almost 10 spam messages so I do NOT want to give up SpamAssassin in any means.  However, each morning I have to reboot the server because of spamd.exe hogging up memory.

     

    I have just dloaded kill.exe.  Can someone explain how to use it or if they have a recommendation for it? 

    DelawareWebs, LLC
    small state. small price. big results.
    www.delawarewebs.com
  • 03-14-2007 1:39 PM In reply to

    • lmst
    • Top 25 Contributor
    • Joined on 03-06-2007
    • Posts 228

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    cgroll:
    I have just dloaded kill.exe.  Can someone explain how to use it or if they have a recommendation for it? 

    Make a bat file like this:

    kill spamd.exe

    Have the bat file scheduled every morning at 4. 

    ----------------------------------------------------------------------------- 

    I was thinking about doing something similar with MailService.exe, but I'm afraid it could damage data.

    We restarted our mailserver this morning since the Mem Usage went too high.
    Now after running about 14 hours (without spamd.exe) the usage is like this:
    MailService.exe  200 Mb
    aspnet_wp.exe 140 Mb
    clamd.exe          37 Mb
    inetinfo.exe       16 Mb
    The rest is below 10 Mb each. Together about 150 Mb

    If you add all you get 543 Mb but the server shows 1000 Mb total.
    Where does the rest of Mb come from?  Anyone who knows? 

  • 03-15-2007 12:17 AM In reply to

    • kdovale
    • Top 100 Contributor
    • Joined on 04-26-2006
    • South Africa
    • Posts 86

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    Hi Guys,

    I had similar problems, and now have resolved, them.

    firstly your balance of your memory is used by microsoft for file cacheing, etc.. I would not recommend running the mail server with less than 2Gb of ram, in my experience a mail server can carry on merilly until that one instance where it is bombed with mail and then you sit with problems.

    Spamassasin on my machine was running up to 550Mb, until I started to look at why this was happening, one filter from rules emporium which I was using sa-blacklist.cf pushed my spam assain up by 240Mb alone. I reverted back all my rules to the standard SA4 rules, and then introduced the custom rules one at a time, until I found out what custom rules did what as far as memory usage was concerned. When spam assain loads it reads in all these rules into memory for the deamon to use, more rules with more checks  = more memory. My spamd normally runs at around 250Mb all the time now since i did this.

    Spamd is a multithreading process although it cannot run as such in windows, it spawns off 2 child processes additional, I did read up on the wiki  for command line parameters to stop this, however If you run spamd manually with these parameters it runs at about 80Mb even with additional rules, but I did not find a solution to tell SM4 to load it with these parameters.

    The number of threads is determined by options --max-children, --min-children, --max-spare and --min-spare. By default spamd.exe lunches one main thread and 1-2 spare child processes that are initially idle. If the mail load increases, spamd.exe may spawn more child processes. To save memory, you can disable all idle child processes by running spamd.exe with options --max-spare=0 --min-spare=0.

     

    Regards

    Keith
  • 03-16-2007 1:06 PM In reply to

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    I made a batch file with the following:

    if /i [spamd.exe]==[END] endlocal&goto end
    taskkill /F /IM spamd.exe* /T
    exit
    :end
    exit

    I'm running this once an hour...hopefully this helps.... 

     

     

    DelawareWebs, LLC
    small state. small price. big results.
    www.delawarewebs.com
  • 04-17-2007 4:45 PM In reply to

    Re: just some thoughts

    Hopefully someone form SmarterTools can find the time to reply to this message seeing as how I don't want to use up my one and only support ticket to get an answer to this.

    So has there been any update on why spamd is using some much memory? Is there any fix? Is anyone at SmarterTools even looking into this?

    It seems that the inclusion of Spam Assassin in v4 of SmarterMail should have been tested more thoroughly, especially since it is enabled by default.

  • 04-17-2007 5:08 PM In reply to

    Re: just some thoughts

    Since I made the batch file (above) I haven't had any trouble.  I have it run every 3 hours just in case, but ZERO problems for me now.
    DelawareWebs, LLC
    small state. small price. big results.
    www.delawarewebs.com
  • 04-20-2007 1:13 AM In reply to

    • kdovale
    • Top 100 Contributor
    • Joined on 04-26-2006
    • South Africa
    • Posts 86

    Re: just some thoughts

    I agree terminating the spamd.exe file "resets" the memory usage but it does not solve the problem, Can Smartertools not provide an exta parameter option under the spam assassin settings where we can specify the --minspare etc parameters, I can get spamd running at 80Mb if I run it manually but somewhere along the line the mail service also bumps a second copy into life and it goes to 150Mb so effectively using more. I just terminated my manual version.. and I am keeping a constant watch on the mail.

     

     

    Regards

    Keith
  • 04-20-2007 2:42 AM In reply to

    Re: just some thoughts

    i am also having issue with using spamassasin . smartermail just fills up spool whenever i enable spamassassin.

    i have installed smfilter and dont know why but it is not scanning for spamassassin .

    i have uncommented line that says sa_path and define correct path of spamassassin installed of plesk.

    but dot know why it is not checking for spamassassin as so many emails coming in without tagging or checking through spamassassin. 

    Regards
    MAK
  • 06-29-2007 6:06 AM In reply to

    • lyew
    • Not Ranked
    • Joined on 06-29-2007
    • Posts 2

    Re: just some thoughts

    At least in my case the memory use seems lower (but still higher than previous SM versions):

    mailservice: 54 MB
    clamd: 53 MB
    spamd: 100 MB

    Still, I know this memory use is under light load and could potentially spike when more messages are processed.

    I found this post, which seems to be targetted towards linux implementations of Spamd, but could nonetheless helpful for Windows users:

    http://wiki.apache.org/spamassassin/OutOfMemoryProblems

     

  • 07-04-2007 8:33 AM In reply to

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    I have a question on this matter. spamd here uses around 100MB after 5 days and I have like 50 mails to handle a day...

    If I kill spamd.exe (automatically), and restart it with the --max-spare=0 --min-spare=0 (automatically), will it work ?

    I intend to kill it every week (for instance) and launch it with the params mentionned, but I wonder if it will continue to work ie scan smartermail mails if restarted "manually" ?

     BR

  • 08-05-2007 3:25 PM In reply to

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    Same here SM4.1 has been running for 3 days and spamd memory usage is at 160mb.

    Have to use IIS for the webmail interface as the SM version doesn't support SSL and thats running at 90mb

    Mail Service: 45mb
    clamd: 35mb
    IIS: 90mb
    spamd: 160mb

    Total: 330mb

    Graham Spratt
    Direct Hosting UK - UK based Shared Hosting / Reseller Hosting / Windows Virtual Private Servers / DotNetPanel Authorized Reseller
    Filed under:
  • 08-07-2007 4:25 PM In reply to

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    It appears to restart on its own just fine, from what I understand.  SmarterMail will just restart it if it's not running.

    My solution, which seems to be working fine so far, is to just have Scheduled Tasks run a batch file once a day to stop the spamd process using "kill.exe" which I have located at c:\program files\support tools (I'm using Win2K server) like this:

    cd c:\program files\support tools
    kill.exe spamd.exe

    Saved it as "SAKill.bat" and have Scheduled Tasks run it at 1:30AM every day.  After it runs, spamd starts right back up.
     

  • 08-08-2007 2:25 AM In reply to

    Re: Spam Assassin process - spamd.exe - is a huge memory hog

    answerman:

    It appears to restart on its own just fine, from what I understand.  SmarterMail will just restart it if it's not running.

    My solution, which seems to be working fine so far, is to just have Scheduled Tasks run a batch file once a day to stop the spamd process using "kill.exe" which I have located at c:\program files\support tools (I'm using Win2K server) like this:

    cd c:\program files\support tools
    kill.exe spamd.exe

    Saved it as "SAKill.bat" and have Scheduled Tasks run it at 1:30AM every day.  After it runs, spamd starts right back up.
     

    That would work but should we have to do that, can't SM Build something into SM that checks the memory usage and restarts the service

    Graham Spratt
    Direct Hosting UK - UK based Shared Hosting / Reseller Hosting / Windows Virtual Private Servers / DotNetPanel Authorized Reseller
Page 2 of 4 (53 items) < Previous 1 2 3 4 Next >