MailScanner SpamAssassin Timeout cause CPU100%

Martin Hepworth maxsec at gmail.com
Thu May 23 10:29:17 IST 2013


have a look here
http://wiki.mailscanner.info/doku.php?id=maq:index#getting_the_best_out_of_spamassassin

I'd look at the Bayes expirey options in MailScanner as well, and perhaps
not do them here, but use the cron-job method instead

-- 
Martin Hepworth, CISSP
Oxford, UK


On 23 May 2013 09:22, 东风 <dongwind at 21cn.com> wrote:

>  dear all,
>     Recently my MailScanner do not run very
> well.MailScanner SpamAssassin Timeout randomly,and when
> SpamAssassin Timeout,the MailScanner process will occupancy CPU 100%,and
> after a few minutes ,the MailScanner process will also occupancy all
> memery,then the system load is too high ,and the system can't work.
>     I google it,do as the people said,set spam.assassinprefs.conf :
> use_bayes 1
> bayes_auto_expire 0
>     But it can't fix the problem.then i run
> #MailScanner --debug --debug-sa
>     I found the point.Every time when the MailScanner process occupancy
> CPU 100%,the log is stop at:
>
>  05:33:31 May 22 05:33:31.411 [5327] dbg: bayes: found bayes db version 3
>
> 05:33:31 May 22 05:33:31.411 [5327] dbg: locker: refresh_lock: refresh /var/spool/MailScanner/spamassassin/bayes.lock
>
> 05:33:31 May 22 05:33:31.525 [5327] dbg: locker: refresh_lock: refresh /var/spool/MailScanner/spamassassin/bayes.lock
>
> 05:33:31 May 22 05:33:31.611 [5327] dbg: locker: refresh_lock: refresh /var/spool/MailScanner/spamassassin/bayes.lock
>
> 05:33:31 May 22 05:33:31.694 [5327] dbg: locker: refresh_lock: refresh /var/spool/MailScanner/spamassassin/bayes.lock
>
> 05:33:31 May 22 05:33:31.779 [5327] dbg: locker: refresh_lock: refresh /var/spool/MailScanner/spamassassin/bayes.lock
>
> 05:33:31 May 22 05:33:31.781 [5327] dbg: bayes: synced databases from journal in 0 seconds: 4023 unique entries (5977 total entries)
>
> 05:33:31 May 22 05:33:31.783 [5327] dbg: bayes: bayes journal sync completed
>
> 05:33:31 May 22 05:33:31.783 [5327] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x15c43580) implements 'learner_expire_old_training', priority 0
> 05:33:31 May 22 05:33:31.783 [5327] dbg: bayes: expiry starting
>
> 05:33:31 May 22 05:33:31.784 [5327] dbg: locker: refresh_lock: refresh /var/spool/MailScanner/spamassassin/bayes.lock
>
> 05:33:31 May 22 05:33:31.784 [5327] dbg: locker: refresh_lock: refresh /var/spool/MailScanner/spamassassin/bayes.lock
>
> 05:33:31 May 22 05:33:31.784 [5327] dbg: bayes: DB expiry: tokens in DB: 16022840, Expiry max size: 150000, Oldest atime: 1346656738, Newest atime: 1369170442, Last expire: 1346700571, Current time: 1369172011
>
> 05:33:31 May 22 05:33:31.785 [5327] dbg: bayes: expiry check keep size, 0.75 * max: 112500
>
> 05:33:31 May 22 05:33:31.785 [5327] dbg: bayes: token count: 16022840, final goal reduction size: 15910340
>
> 05:33:31 May 22 05:33:31.785 [5327] dbg: bayes: first pass? current: 1369172011, Last: 1346700571, atime: 43200, count: 265804, newdelta: 721, ratio: 59.8574137334276, period: 43200
>
> 05:33:31 May 22 05:33:31.785 [5327] dbg: bayes: can't use estimation method for expiry, unexpected result, calculating optimal atime delta (first pass)
> 05:33:31 May 22 05:33:31.785 [5327] dbg: bayes: expiry max exponent: 9
>
>      Stop at here ,and the MailScanner process occupancy CPU 100%, then
> after 30 seconds(because i set SpamAssassin Timeout = 30 ), the log will
> go on:
>
>
> 05:34:45 May 22 05:34:45.809 [5330] dbg: dns: name server: 10.145.199.100, LocalAddr: 0.0.0.0
>
> 05:34:45 May 22 05:34:45.810 [5330] dbg: dns: resolver socket rx buffer size is 129024 bytes
> 05:34:45 May 22 05:34:45.810 [5330] dbg: config: time limit 300.0 s
>
> 05:34:45 May 22 05:34:45.812 [5330] dbg: message: main message type: multipart/mixed
>
> 05:34:45 May 22 05:34:45.812 [5330] dbg: message: ---- MIME PARSER START ----
>
> 05:34:45 May 22 05:34:45.813 [5330] dbg: message: parsing multipart, got boundary: part_60947f67_06c3_40e0_b324_b2bcc46f02c2
> ...............................
>
>     I don't know why and how to fix it.And i found when i run
>
> #MailScanner --debug --debug-sa
>
>    The MailScanner process will release resources after 30 seconds,when i
> run(i set Max Children = 5)
> #service MailScanner start
>
>    The MailScanner process which occupancy CPU 100% will not release
> resources .....And after a few minutes,maybe more MailScanner process will
> occupancy resources ,and after all the system is hung.I even set
> SpamAssassin Timeout = 10 ,but can't fix either.
>
>    So,are there any friends know how to fix this problem? Thx!
>
>
> ---------------------------------------
> 21CN手机邮Android客户端,邮件随身享! <http://mail.21cn.com/m/21cn/index.html>
>
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20130523/bc470919/attachment.html 


More information about the MailScanner mailing list