The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

'spamd' bottleneck after update

Discussion in 'E-mail Discussions' started by vs-fam, Oct 20, 2015.

  1. vs-fam

    vs-fam Active Member

    Joined:
    Mar 18, 2010
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    Hi,

    We have noticed, after the latest cPanel update, a unbearable bottleneck caused by 'spamd'. SMTP timeouts while trying to send, RoundCube and the like timing out, etc. Even though we get these errors, most of the time the email does get sent, however, all email clients claim that emails are not sent leaving them on the outgoing tray.

    The minute we disable all types of SPAM scans, everything goes back to normal.

    Anyone else seeing these behavior?

    Thanks
     
    HOTNET likes this.
  2. Jaxson Chin

    Jaxson Chin Registered

    Joined:
    Oct 20, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    malaysia
    cPanel Access Level:
    Root Administrator
    Hi,

    Im having a problem that spamd.child keeps getting high load and causing email not able to be sent out.

    The process is as below:
    17747 cpanelex 20 0 210m 70m 3600 R 100.0 3.7 2:11.17 spamd child

    May i know what application is using the user access "cpanelex"? And what is the cause?

    I saw some article mentioned that it was cause by Spam Assassin Recent update.


    Kindly Advice.

    Thank You.
     
  3. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    I'm finding that spamd fails at least 3 times a day whereas before the upgrade it NEVER failed.
     
  4. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    We've noticed this on every one of our cpanel servers since the latest update. Have tried a number of things with no success. We are only using spam assassin for outbound checking - so it's not been a problem to temporarily disable the service. Symptoms are spamd child process using 100% CPU and clients are then unable to send mail. chkservd hangs while waiting on spamd so we get these notifications too. Restarting Exim seems to temporarily resolve it.
     
  5. bloatedstoat

    bloatedstoat Well-Known Member

    Joined:
    Jun 14, 2012
    Messages:
    78
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Victoria, Australia
    cPanel Access Level:
    Root Administrator
    We have this issue too.
    Is anyone else getting this in their logs and when running lint?

    warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520.
    warn: rules: failed to run __KAM_SPF_NONE test, skipping:
    warn: (Can't locate object method "check_for_spf_none" via package "Mail: [...]:SpamAssassin::PerMsgStatus" at (eval 1798) line 1449.
    warn: )
    warn: lint: 1 issues detected, please rerun with debug enabled for more information

    This is triggered on line 4380 within /etc/mail/spamassassin/KAM.cf
     
  6. alphahost

    alphahost Registered

    Joined:
    Oct 22, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Riga
    cPanel Access Level:
    Root Administrator
    Same problem here.
    Constantly having one or two spamd child proccesses by cpanelex user which are using 99-100% of cpu.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could someone experiencing this issue post the contents of the /etc/cpspamd.conf file on their system (if it's been configured)? Also, while unlikely to relate to the CPU usage increase for spamd, a separate issue with SpamAssassin was recently addressed in cPanel version 11.52.0.18:

    Fixed case CPANEL-1942: Clean up previous bad SpamAssassin updates.

    Thank you.
     
  8. kamm

    kamm Active Member

    Joined:
    Jan 17, 2004
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    We're seeing this issue too...

    WHM 11.52.0 (build 18)

    /etc/cpspamd.conf

    Server 1 (changed by our server admin around 12 hours - so far no failures, but not long enough to say the issue is resolved)
    maxchildren=10
    maxconnperchild=5


    Server 2 (original configuration)
    maxspare=1
    maxchildren=3
     
  9. tmurdock

    tmurdock Member

    Joined:
    Jul 6, 2015
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    I'm seeing the same problem, a lot of SMTP data timeouts from remote servers, causing us to not receive emails. I've tried disabling spamd but it doesnt seem to help.
     
  10. JonTheWong

    JonTheWong Active Member

    Joined:
    Oct 8, 2013
    Messages:
    38
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Montreal, Quebec
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm seeing the same thing on our servers

    Code:
    Oct 23 12:49:36 magi spamd[1764]: rules: failed to run __KAM_SPF_NONE test, skipping:
    Oct 23 12:49:36 magi spamd[1764]:  (Can't locate object method "check_for_spf_none" via package "Mail: [...]:SpamAssassin::PerMsgStatus" at (eval 1742) line 1709.
    Oct 23 12:49:36 magi spamd[1764]: )
    Oct 23 12:49:37 magi spamd[1764]: spamd: server started on IO::Socket::INET6 [127.0.0.1]:783 (running version 3.4.1)
    As for /etc/cpspamd.conf

    Code:
    allowedips=127.0.0.1
    maxchildren=4
    maxconnperchild=10
    maxspare=1
    pidfile=/var/run/spamd.pid
    timeoutchild=60
    timeouttcp=60
    
     
    #10 JonTheWong, Oct 23, 2015
    Last edited: Oct 23, 2015
  11. vs-fam

    vs-fam Active Member

    Joined:
    Mar 18, 2010
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    We have changed the parameters in cpspamd.conf and so far is working well. However, the question still remains... What changed in the last cPanel update to require now some tweaking?

    Current values:
    Code:
    maxspare=1
    maxchildren=10
    maxconnperchild=5
    
     
  12. bloatedstoat

    bloatedstoat Well-Known Member

    Joined:
    Jun 14, 2012
    Messages:
    78
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Victoria, Australia
    cPanel Access Level:
    Root Administrator
    I've had a ticket open, closed and reopened several times regarding the KAM_SPF_NONE rule. (Ticket 7270125, currently re-opened).

    The first attempted resolution was to reinstall spamassassin, appeared to address the issue but then it reappeared.

    Thereafter /usr/local/cpanel/3rdparty/bin/sa-update was executed, which again appeared to have resolved the issue.

    It did kill off the "warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520." but the "Can't locate object method "check_for_spf_none" via package Mail" issue remains.

    On the matter of spamd croaking, despite the post being 5 years old I followed some advice at the bottom of this post Spam Assassin spamd max children setting? and reduced the maxchildren from 4 to 1 and left everything else at its default and spamd has not failed since that change.

    When spamd bails out the CPU usage for the spamd daemon is above 45% on its own or above 30% with another process running in tandem that is consuming high CPU, such as restartsrv_base name as per the following examples.

    PID Owner CPU % Memory % Command

    697233 root 56.67 0.20 /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/scripts/restartsrv_mysql --check --notconfigured-ok
    697205 root 32.21 1.24 /usr/local/cpanel/3rdparty/perl/514/bin/spamd --daemonize --allowed-ips=127.0.0.1 --max-children=8 --max-spare=1 --pidfile=/var/run/spamd.pid -i127.0.0.1

    465971 root 38.69 1.24 /usr/local/cpanel/3rdparty/perl/514/bin/spamd --daemonize --allowed-ips=127.0.0.1 --max-children=8 --max-spare=1 --pidfile=/var/run/spamd.pid -i127.0.0.1
    466004 root 19.19 0.21 /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/scripts/restartsrv_base named --check --notconfigured-ok

    334552 root 30.58 1.23 /usr/local/cpanel/3rdparty/perl/514/bin/spamd --daemonize --allowed-ips=127.0.0.1 --max-children=8 --max-spare=1 --pidfile=/var/run/spamd.pid -i127.0.0.1
    334567 root 20.29 0.18 /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/scripts/restartsrv_p0f --check --notconfigured-ok

    Output for /etc/cpspamd.conf
    allowedips=127.0.0.1
    maxchildren=1
    maxconnperchild=200
    maxspare=1
     
  13. kamm

    kamm Active Member

    Joined:
    Jan 17, 2004
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Update: Still getting failures despite the changes made to Server 1

     
  14. MediaServe

    MediaServe Well-Known Member
    PartnerNOC

    Joined:
    Apr 9, 2004
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nashville, TN USA
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Similar problem here on a brand new freshly installed 11.52.0 (build 20) server with the KAM rules enabled:

    spamassassin --lint
    Oct 27 11:49:44.006 [3923] warn: rules: failed to run __KAM_SPF_NONE test, skipping:
    Oct 27 11:49:44.006 [3923] warn: (Can't locate object method "check_for_spf_none" via package "Mail: [...]:SpamAssassin::PerMsgStatus" at (eval 1791) line 1449.
    Oct 27 11:49:44.006 [3923] warn: )
    Oct 27 11:49:44.471 [3923] warn: lint: 1 issues detected, please rerun with debug enabled for more information

    Disable the KAM rules in Exim Configuration and the problem is gone (which stands to reason.)

    The more good spam filtering rules the better, so I'm hoping this gets fixed asap.
     
  15. bloatedstoat

    bloatedstoat Well-Known Member

    Joined:
    Jun 14, 2012
    Messages:
    78
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Victoria, Australia
    cPanel Access Level:
    Root Administrator
    The ticket I had open for this issue was resolved (by cPanel) by totally removing and reinstalling spamassassin. The KAM SPF error is fixed and spamd has not fallen over either since then, I tweaked maxchildren to 2 as well as I was getting messages in the maillog to raise it when I had only 1.
     
  16. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Seeing lots of warnings from CSF/LFD on spamd excessive/suspicious use since updating to WHM 11.50.2 (build 2) last week on two Centos 6.3 machines. Customers also reporting long time waits on sending email (15-20 seconds). We only do UPCP manually once in a while so we can keep an eye on things. We were running 11.50.30.0 before this.

    Note:
    exim exim-4.85-8.cp1148.x86_64
    spamd 3.4.0
    on both machines.
     
  17. cPanelJesse

    cPanelJesse Technical Analyst Manager
    Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    51
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Houston
    cPanel Access Level:
    Root Administrator
    @Jaxson Chin @alphahost would both of you mind submitting a ticket at tickets.cpanel.net so we can take a closer look at what you're observing? Feel free to email me jesse[at]cpanel.net with the ticket ID's so I can follow up with them.

    Thanks!
     
  18. Russell Harrower

    Russell Harrower Registered

    Joined:
    Jun 29, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Melbourne, AU
    cPanel Access Level:
    Root Administrator
    I keep getting these messages every 30minutes or so, the server provider says that it is due to not enough memory and that I need to upgrade the server. But there just has to be away to limit the memory use of the spamd processor or something here is most of the email - minus the server details - if anyone can help fix this I would be grateful.


    Code:
    [B]Name[/B]
    
    spamd
    
    [B]Service Status[/B]
    
    failed 
    
    [B]Notification[/B]
    
    The service “spamd” appears to be down.
    
    [B]Service Check Method[/B]
    
    The system’s command to check or to restart this service failed.
    
    [B]Number of Restart Attempts[/B]
    
    2
    
    [B]Startup Log[/B]
    
    No startup log
    
    [B]Memory Information[/B]
    
    Used
    
    6.08 GB
    
    Available
    
    70 MB
    
    Installed
    
    2 GB
    
    [B]Load Information[/B]
    
    0.55 0.41 0.32
    
    [B]Uptime[/B]
    
    8 days, 21 hours, 35 minutes, and 32 seconds
    
    [B]IOStat Information[/B]
    
    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
    
              9.05    0.02    0.33    0.00    0.00   90.59
    
    Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
    
    [B]Top Processes[/B]
    
    [B]PID[/B]
    
    [B]Owner[/B]
    
    [B]CPU %[/B]
    
    [B]Memory %[/B]
    
    [B]Command[/B]
    
    9701
    
    root
    
    38.63
    
    3.47
    
    /usr/local/cpanel/3rdparty/perl/514/bin/spamd --daemonize --max-spare=1 --max-children=3 --allowed-ips=127.0.0.1 --pidfile=/var/run/spamd.pid -i127.0.0.1
    
    9695
    
    sallygoldner
    
    33.09
    
    0.00
    
    
    9668
    
    sallygoldner
    
    14.79
    
    0.00
    
    
    
    9707
    
    root
    
    4.17
    
    0.45
    
    /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/scripts/restartsrv_queueprocd --check --notconfigured-ok
    
    9566
    
    sallygoldner
    
    1.71
    
    0.00
    
    
     
    #18 Russell Harrower, Nov 2, 2015
    Last edited by a moderator: Nov 2, 2015
  19. nickl_sa

    nickl_sa Registered

    Joined:
    Nov 6, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Hi there

    I am getting one or two notifications per day for spamd failing, and then recovering, which I never received previously.

    Please help.

    Thanks

    Kind regards
    Nick
     
  20. nicknice

    nicknice Member

    Joined:
    Dec 21, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Mr/Mrs,

    I have facing a big issues. I have try to restart the spamd and update to lastest version still cannot solve the issues. Below is the detail of the spamd from email. Thanks.

    Code:
    
    [B]Service Name[/B] spamd
    [B]Service Status[/B] failed 
    [B]Notification[/B] The service “spamd” appears to be down.
    [B]Service Check Method[/B] The system’s command to check or to restart this service failed.
    [B]Number of Restart Attempts[/B] 2,257
    [B]Startup Log[/B] child process [1846] exited or timed out without signaling production of a PID file: exit 255 at /usr/local/cpanel/3rdparty/perl/514/bin/spamd line 2983.
    [B]Memory Information[/B]
    Used 2.22 GB
    Available 29.11 GB
    Installed 31.33 GB
    [B]Load Information[/B] 0.44 0.24 0.20
    [B]Uptime[/B] 17 days, 13 hours, 35 minutes, and 49 seconds
    [B]IOStat Information[/B] avg-cpu:  %user  %nice %system %iowait  %steal  %idle           4.33    0.17    1.34    0.27    0.00  93.88 Device:            tps  Blk_read/s  Blk_wrtn/s  Blk_read  Blk_wrtn sda              10.52        30.37      278.53  46087294  422736764 dm-0            29.46        8.54      234.35  12965156  355682952 dm-1              0.00        0.00        0.00      2600          0 dm-2              5.66        21.80        44.18  33094178  67053760
    
     
    #20 nicknice, Nov 6, 2015
    Last edited by a moderator: Nov 29, 2016 at 5:23 AM
Loading...
Similar Threads - 'spamd' bottleneck update
  1. AussieNetworks
    Replies:
    1
    Views:
    30

Share This Page