Results 1 to 11 of 11

Thread: Updated Dovecot to 2.3.0. Now Excessive resource usage warnings from CSF/LFD

  1. #1
    Join Date
    Jun 2013
    Location
    Dutch Mountains
    Posts
    272

    Updated Dovecot to 2.3.0. Now Excessive resource usage warnings from CSF/LFD

    Updated Dovecot to 2.3.0. last night and since then CSF/LFD is sending Excessive resource usage warnings every hour;

    Code:
    Time:         Sun Jan  7 14:02:11 2018 +0100
    Account:      dovecot
    Resource:     Process Time
    Exceeded:     45127 > 1800 (seconds)
    Executable:   /usr/libexec/dovecot/stats
    Command Line: dovecot/stats [19 connections]
    PID:          8780 (Parent PID:8670)
    Killed:       No
    Code:
    Time:         Sun Jan  7 15:02:17 2018 +0100
    Account:      dovecot
    Resource:     Process Time
    Exceeded:     48733 > 1800 (seconds)
    Executable:   /usr/libexec/dovecot/stats
    Command Line: dovecot/stats [16 connections]
    PID:          8780 (Parent PID:8670)
    Killed:       No
    Tried adding
    Code:
    exe:/usr/libexec/dovecot/stats
    to csf.pignore but the warnings still continue.

    I noticed this in the Dovecot changelog:

    v2.3.0 2017-12-22 Timo Sirainen <tss@iki.fi>

    * Logging rewrite started: Logging is now based on hierarchical events.
    This makes it possible to do various things, like: 1) giving
    consistent log prefixes, 2) enabling debug logging with finer
    granularity, 3) provide logs in more machine readable formats
    (e.g. json). Everything isn't finished yet, especially a lot of the
    old logging code still needs to be translated to the new way.
    * Statistics rewrite started: Stats are now based on (log) events.
    It's possible to gather statistics about any event that is logged.
    See http://wiki2.dovecot.org/Statistics for details

    What needs to be 'told' CSF/LFD to stop the warnings?

  2. #2
    Join Date
    Aug 2015
    Posts
    292
    Hi,
    Did you restart CSF?
    Code:
    csf -r
    Otherwise try to add this rules also to csf.pignore

    exe:/usr/libexec/dovecot/pop3
    exe:/usr/libexec/dovecot/pop3-login
    exe:/usr/libexec/dovecot/imap-login
    or disable Excessive resource usage warnings completely in csf.conf:
    PT_USERMEM=0
    then restart CSF

  3. #3
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,291
    I wouldn't disable the PT_USERMEM for this.

    to csf.pignore but the warnings still continue.
    Awd is correct, just restart csf and if you want to be really sure also restart lfd.

    I'm curious if these stats are needed and if now if it would be possible to disable this process from Dovecot.
    Greetings, Richard.

  4. #4
    Join Date
    Jun 2013
    Location
    Dutch Mountains
    Posts
    272
    The other 3 rules were already present in csf.pignore.
    I restarted CSF with "csf -r". Not sure if that also restarts LFD but will restart both.
    Last edited by BBM; 01-07-2018 at 10:41 AM.

  5. #5
    Join Date
    Jun 2013
    Location
    Dutch Mountains
    Posts
    272
    Restarting LFD seemed to work.

  6. #6
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,291
    Great. Just for future references... "csf -r" will only restart csf, not lfd which is a seperate process and has to be restarted seperately.
    Greetings, Richard.

  7. #7
    Join Date
    Apr 2015
    Posts
    140
    I'm seeing the same over here. It's on a smallish VPS, and I'm not sure I'm comfortable with Dovecot using this much CPU time (the "exceeded" times are even higher than those that the OP posted). Is there a way to turn down the degree of logging/stats in Dovecot to save on CPU usage?

  8. #8
    Join Date
    Jan 2017
    Posts
    14
    Same experience here.

  9. #9
    Join Date
    Apr 2015
    Posts
    140
    Okay now, I've been looking over the messages LFD generated from /usr/libexec/dovecot/stats a but more closely today, and I think I see a pattern...

    Code:
    Time:         Thu Jan 25 16:49:39 2018 +0100
    Account:      dovecot
    Exceeded:     5443 > 1800 (seconds)
    
    Time:         Thu Jan 25 17:49:45 2018 +0100
    Account:      dovecot
    Exceeded:     9049 > 1800 (seconds)
    
    Time:         Thu Jan 25 18:49:50 2018 +0100
    Account:      dovecot
    Exceeded:     12654 > 1800 (seconds)
    
    Time:         Thu Jan 25 19:49:55 2018 +0100
    Account:      dovecot
    Exceeded:     16259 > 1800 (seconds)
    
    Time:         Thu Jan 25 20:50:01 2018 +0100
    Account:      dovecot
    Exceeded:     19865 > 1800 (seconds)
    Duh! That's just a process that runs indefinitely. I didn't notice that yesterday, because I had to restart Dovecot a few times over the course of the day. The exceeded times then looked funky, but it didn't strike me that it had to do with the restarts.
    So yes, I think that the earlier advice in this thread suggested was correct: just add it to csf.pignore...

    Code:
    echo "exe:/usr/libexec/dovecot/stats" >> /etc/csf/csf.pignore
    service lfd restart
    ...and don't forget to restart LFD.

    Couldn't find a configuration option to turn off this "stats" process in the Dovecot docs, but I'm not bothered. It doesn't seems to use much CPU.
    Last edited by zmippie; 01-25-2018 at 12:33 PM.

  10. #10
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,010
    The stats process runs by default. But currently there are no statistics logged by default (but this might change):

    Code:
    # doveadm stats dump
    metric_name     field   count   sum     min     max     avg     median  %95
    So it does not seem to do anything.... but running idle in memory: https://wiki2.dovecot.org/Statistics

    You might want to try and disable it. As of now I don't have information on how to disable this plugin in Dovecot, so feel free to find it out yourself and update us with your results.

  11. #11
    Join Date
    Apr 2015
    Posts
    140
    Alex, I too noticed that the stats did not provide much information. I thought it might have something to do with passing wrong or too little arguments, because I saw the same output as you posted. I'm going to try and find out if the stats module can be disabled.

Posting Permissions

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