SpamAssassin CPU Overload: Post 2.2.30

Discussion in 'General' started by crypted, Apr 22, 2009.

  1. crypted

    crypted Member

    There is an issue with the latest Spam Assassin used in 2.2.31 and 2.2.32 that causes systems to panic in some instances and otherwise be rendered useless due to the new CPU/Memory intense structures of Spam Assassin.

    My system was rendered useless for a few hours before its load settled down again today (just an example). Spam Assassin used 100% of the CPU across three instances for over two hours while I monitored "TOP" output tonight.

    I am not familiar with ISPCONFIG's configuration of Spam Assassin, nor am I familiar with Spam Assassin. Please, someone with knowledge remedy a solution as people may not realize this is a cause of instability that many probably will be or are having who still are on the 2.x.x branch.

    Here are some links I found regarding similar issues:
    http://ubuntuforums.org/showthread.php?t=508942
    http://www.mail-archive.com/[email protected]/msg11631.html
    https://www.gnax.net/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=16

    CPANEL offers some sort of patch to remedy this problem as of late according to my Googling.

    Thanks!
     
  2. crypted

    crypted Member

    Interesting, I changed to CLAMD instead of CLAM as old users had to do a couple years back and that did away with CLAM running alongside Spam Assassin with high loads. However, Spam Assassin still has very high CPU usage.

    It's worthy to note that Spam Assassin runs with very high CPU usage for about 2 to 3 minutes instead of hours with the change to CLAMD. Any ideas on how to further decrease the load?
     
    Last edited: Apr 22, 2009
  3. crypted

    crypted Member

    Server has quit responding as huge load on SPAMASSASSIN application. Please help.

    I hear that spamd is better to execute than spamassassin. How can hat be changed so that ISPCONFIG uses SPAMD instead of the spamassassin app?
     
    Last edited: Apr 22, 2009
  4. crypted

    crypted Member

    I found that in every users directory .spamassassin.rc allows for changing spamassassin to spamc for checking mail.

    The automatic check was not working and emails that were 5MB were being looped into "spamassassin." How can I change the default generated spamassassin.rc to be spamc and start using spamd to remove the spamassassin overloads?

    After entirely disabling spamfilter from ISPCONFIG's Management Email settings the problem didn't fully disappear. Spamassassin was still trying to run on those users who it had been fighting to get through their emails.

    After a few killall's and restarts of ISPCONFIG it cleaned up.

    I would like to get Spamassassin operational again.
     
  5. tebokkel

    tebokkel New Member

    I manually change the executable used for ClamAV in /home/admispconfig/ispconfig/tools/clamav/bin/clamassassin:
    CLAMSCAN=/usr/bin/clamdscan

    This was a tip somewhere on this forum a long time ago. It's one of my issues with ISPConfig 2, the need to change some files after every upgrade... :D

    Paul
     
  6. crypted

    crypted Member

    I changed mine yesterday after finding a thread on CLAMAV. Didn't solve it. The change you referred to, here's mine:
    # Configure your full path to clamscan or clamdscan
    # (If you use clamdscan, see the README for directions)
    #CLAMSCAN=/home/admispconfig/ispconfig/tools/clamav/bin/clamscan
    CLAMSCAN=/home/admispconfig/ispconfig/tools/clamav/bin/clamdscan


    Furthermore, after another server lockup I renamed spamassassin to spamassassin.orig and copied spamc to spamassassin. Then, I added spamd as a daemon. Hoped that would work but it didn't. Not even with modifications to .spamassassin.rc files in user directories.

    What I want to know is, can I downgrade from 2.2.32 to 2.2.30 without issues? Things were fine then. Furthermore, how can we solve this if not?
     
    Last edited: Apr 23, 2009
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You dont have to downgrade to 2.2.30, just install the spamassassin version of your choice to /home/admispconfig/ispconfig/tools/spamassassin/

    the ispconfig daemon has nothing to do with spamassassin, so restarting ispconfig does not do anything except of producing more load in this situation.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    All master templates are in /root/ispconfig/isp/conf. You should put your modified versions in the customized_templates folder.
     
  9. kassie

    kassie New Member

    Hi Till,

    Will you please give me a little how to for this as I am fearly new to linux. I also have the same problem with high cpu usage and high server load. When i do top i keep getting a lot of spamassassin processes.

    I would like to go back to 2.2.30 as i never had the problem then.

    Thanks for all the help
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not go back to a older ispconfig version by installing it as the database is not compatible then. What you can do of course is to restore a backup of a older ispconfig (/root/ispconfig, /home/admispconfig and the mysql database) if you have one. The problem that you have is not in ispconfig itself as spamassassin and clamav use more resources in the latest verions and not ispconfig. We have to use the latest versions of spamassassin and clamav as the older versions contain either bugs or users request to get always the latest clamav.
     
  11. peter.zagar

    peter.zagar New Member

    Hi, everyone!

    Recently, this has also become a huge problem for me, too.

    I haven't yet managed to locate the exact culprit, but it must be either the clamscan process or spamassassin, or the combination of the two.

    I have three servers running ISPconfig 2.2.29.

    The first one has around 600 mailboxes, the second one has around 130 mailboxes, and the third one about 30 mailboxes.

    The clients occasionally need to send some system-wide messages to all local mailbox users. I tried to solve this by using OpenNewsletter php application. It uses regular ISPconfig mailuser for sending mail.

    The problem is, that this mass mail sending usually kills the ISPconfig server, only the one with 30 users survives it. What happens is, all 600 mails try to get sent at the same time, and invoke antivirus and antispam checking.

    This maxes the quad-core cpu to 100% and starts to fill ram very rapidly. First, all available ram is used, then all swap is filled, and, at that point the server becomes unresponsive. The system tries to recover by invoking oom-killer process but fails to to that as the processes from mail keep opening new ones.

    This cpu/mem maxing out to 100% also happens when throwing 30 mails at once into maildrop queue, but the server survives it.

    The only solution for bringing the server to life again is to reboot it, confirm steps in interactive boot mode, move all mails from active queue in /var/spool/postfix/active to another directory before starting Ispconfig_server process.

    So, how can I prevent this? Is there some option to optimize clamav and spamassassin?

    Anyone?

    Big thanks for any help, I really need solution for this..

    Peter
     
  12. peter.zagar

    peter.zagar New Member

    I've came across some posts suggesting to disable clamscan and enable clamd on ispconfig.

    I have the latest Centos 5.3 and latest ISPconfig 2 now installed (I just upgraded).

    Is there some tutorial to migrate spamassassin and clam to daemon mode on Centos with ISPconfig? I would also like to know what happens when you do a regular ISPconfig update on such system.

    Thanks,

    - Peter
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I know there is no tutorial for that except of the infos here in the forum. ISPConfig updates might change settings back, so you should keep a copy of your modified files and make sure that all mofified templates are in the customized_templates folder.
     
  14. MasteRTriX

    MasteRTriX Member

    I installed clamd in my ispconfig server, and the performance increased a lot.

    A question, is it possible to install amavis/spamd or something to get better performance in the antispam system, and if so, will it mantain the per user settings?

    Another question, does spammassasin run by ispconfig log anywhere besides the mail what happens? Running 2.2.33
     
  15. crypted

    crypted Member

    I'm not sure about the recent questions, but the way I solved my CPU load issue was a new harddrive. It turns out that my four-year-old hard drive was failing so I backed up what I could and started over.
     
  16. MasteRTriX

    MasteRTriX Member

    in my case is a brand new system :p
     
  17. txapapotie

    txapapotie New Member

    clamassasin

    In my case my CPU reaches 100% when it has 2 or more clamscan proccesses running same time. I have changed some lines of the clamassasin script found at /home/admispconfig/ispconfig/tools/clamav/bin to avoid simultanious scan proccesses.

    It suits my low traffic server.

    Add this lines at the top of the script

    #!/bin/sh
    #
    sleep $(($RANDOM%10))
    TEST=`ps -A | grep clams | grep -v grep | wc -l`
    while [ $TEST != "0" ];
    do
    sleep $(($RANDOM%10))
    TEST=`ps -A | grep clams | grep -v grep | wc -l`

    done
     

Share This Page