Results 1 to 4 of 4

Thread: Amavisd causes high CPU and hangs the server

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    Hong Kong
    Posts
    77
    Rep Power
    3

    Default Amavisd causes high CPU and hangs the server

    Hello,

    I've been having a problem that only sprouts up every 3 or 4 months, and usually right after a Zimbra version upgrade.

    Amavasid causes high CPU and I have to restart the server. I've found that I get duplicate databases in /opt/zimbra/data/clamav/db/

    I see this (NOTICE THE DUPLICATES)
    -rw-r----- 1 zimbra zimbra 301568 Nov 17 05:06 bytecode.cld
    -rw-r----- 1 zimbra zimbra 18213888 Nov 20 07:30 daily.cld
    -rw-r----- 1 zimbra zimbra 6823191 Nov 20 15:35 daily.cvd
    -r--r--r-- 1 zimbra zimbra 5360406 Aug 16 12:38 daily.cvd.init
    -r--r----- 1 zimbra zimbra 30750647 Nov 20 15:30 main.cvd
    -r--r--r-- 1 zimbra zimbra 30750647 Aug 16 12:38 main.cvd.init
    -rw------- 1 zimbra zimbra 988 Nov 20 15:36 mirrors.dat

    I'm able to fix this by running the following commands:
    Code:
    cd /opt/zimbra/data/clamav/db/
    rm -rf *
    /opt/zimbra/clamav/bin/freshclam --config-file=/opt/zimbra/conf/freshclam.conf -d --checks=12
    zmamavisdctl stop
    zmamavisdctl start
    This basically deleted the existing ClamAV databases (which I believe are corrupt) and then Freshclam downloads new ones.
    Restarting Amavisd fixes the problem.

    What's weird is that when it first downloads the new databases, there is not a duplicate daily.* file. There is just the following:

    -rw-r----- 1 zimbra zimbra 59212 Nov 20 16:39 bytecode.cvd
    -rw-r----- 1 zimbra zimbra 6823485 Nov 20 16:39 daily.cvd
    -rw-r----- 1 zimbra zimbra 30750647 Nov 20 16:34 main.cvd
    -rw------- 1 zimbra zimbra 52 Nov 20 16:39 mirrors.dat

    Any idea what is causing this problem?

    I keep seeing this in the freshclam.log
    [LibClamAV] Detected duplicate databases /opt/zimbra/data/clamav/db/daily.cvd and /opt/zimbra/data/clamav/db/daily.cld, please manually remove one of them
    Release 7.2.4_GA_2900.UBUNTU10_64 UBUNTU10_64 FOSS edition.

  2. #2
    Join Date
    Nov 2009
    Location
    Ljubljana, Slovenia
    Posts
    268
    Rep Power
    6

    Default

    Quote Originally Posted by davidkillingsworth View Post
    I keep seeing this in the freshclam.log
    [LibClamAV] Detected duplicate databases /opt/zimbra/data/clamav/db/daily.cvd and /opt/zimbra/data/clamav/db/daily.cld, please manually remove one of them
    Exactly the same problem on ZCS 8.0.2, Amavis at 100% CPU all the time.

    I examined the freshclam.log, but I found NO relations between CPU graph and CLAM updates.
    The above quoted error was present already before, from the freshclam.log start.

    In my case, tha DavidKillingsworth's procedure does not resolve the issue, not even temporarily. After his steps, I get in freshclam.log:
    Code:
    --------------------------------------
    freshclam daemon 0.97.6-broken-compiler (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
    ClamAV update process started at Wed Feb 13 16:08:15 2013
    main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
    daily.cld is up to date (version: 16674, sigs: 765454, f-level: 63, builder: guitar)
    bytecode.cld is up to date (version: 213, sigs: 42, f-level: 63, builder: neo)
    [LibClamAV] Detected duplicate databases /opt/zimbra/data/clamav/db/main.cvd and /opt/zimbra/data/clamav/db/main.cld, please manually remove one of them
    --------------------------------------
    CPU is still 100% busy with amavis process.
    The interesting part is "...0.97.6-broken-compiler...", which even uncle Google does not know about.

    Seems related to ZCS upgrade, but I have no proof for that.
    This was the case under rare circumstances even in 7.2.0 version: http://www.zimbra.com/forums/adminis...0-upgrade.html
    Code:
    zimbra@zimbra:~/clamav/bin$ ./clamscan -V
    ClamAV 0.97.6-broken-compiler
    Last edited by Labsy; 02-13-2013 at 08:26 AM.
    Zimbra on SGH dedicated hosting farm, Slovenia.
    In 2013 we announce new program of low cost SSL server certificates.

  3. #3
    Join Date
    Nov 2009
    Location
    Ljubljana, Slovenia
    Posts
    268
    Rep Power
    6

    Default

    If anybody has similar problems, please, contribute with diagnostic log as per this BUG report on the issue:
    https://bugzilla.zimbra.com/show_bug.cgi?id=80304
    Zimbra on SGH dedicated hosting farm, Slovenia.
    In 2013 we announce new program of low cost SSL server certificates.

  4. #4
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    476
    Rep Power
    4

    Default

    Hello, look at http://www.zimbra.com/forums/adminis...ce-tuning.html

    .. just in case ..

    ccelis.

Similar Threads

  1. IMAP Server Hangs
    By Greenview in forum Administrators
    Replies: 0
    Last Post: 07-26-2011, 10:51 AM
  2. [SOLVED] Amavisd hangs
    By vginders in forum Installation
    Replies: 13
    Last Post: 09-04-2010, 01:19 PM
  3. High Load amavisd after upgrade to 6.0.1
    By Nextasy in forum Installation
    Replies: 11
    Last Post: 05-19-2010, 11:51 AM
  4. Replies: 0
    Last Post: 07-17-2007, 08:57 PM
  5. Extremely High Memory Usage for Amavisd
    By atomicfission in forum Installation
    Replies: 4
    Last Post: 10-02-2006, 03:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •