Huge cpu load by process journalctl -u postfix* -u dovecot*

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 2.105
Virtualmin version 7.10.0 Pro
Related packages SUGGESTED
hi i have stopped clamav + postfix + dovecot startup on boot from system/booutup and shutdown because i don’t use this services, but sometimes a process “journalctl -u postfix* -u dovecot*” have a huge cpu load. How can i disable that ?
thx

Two things:

Virtualmin thinks you’re processing mail on the system, but you aren’t. You should tell Virtualmin about that in Features and Plugins.

You must have a lot of stuff going on in the journal for it to take a long time for that command to chew up a lot of CPU. You should figure out what that is. It should be almost instant for a system that isn’t hosting mail; obviously if you have no Postfix or Dovecot log entries, there would be nothing to ingest, so I think the only reason it’d be slow is if the journal is huge and growing fast for other reasons. So, look at the journal to see what’s happening on your system that you don’t know about.

hi, where is features and plugins ? From all my virtuals servers theses services (mail and antivirus) are disabled)

image

ok thx, not disabled on one virtual server. solved

1 Like

Same on my side but it’s still going on even after disabling the features. It usually runs every 5 min during about 15 - 20 seconds.
I checked postfix and dovecot journal but nothing seems weird. As I’m not an expert, I’d like to know if I need to check something else.

These are the 2 processes running.
|26448|root|88.6%|journalctl-u postfix*-u dovecot*|
|26279|root|21.6%|/usr/share/webmin/virtual-server/collectinfo.pl

You could be hardware limited? There is a recommended minimum on the resources, but, doesn’t mean it is really enough depending on what else is running.

I’m on a VPS with a 2-core CPU at 2.6 GHz, 2 GB of RAM, and 2 GB of swap. Seven websites are running with a few visits every month. PHP-FPM is on demand for all of them. No mail is running now, though I had mail running on a virtual server that I deleted. I never succeeded in making SASL authentication work, so I decided to forget the idea of using emails on the server.

I think I’ll just reinstall the server to have a fresh system, tell Virtualmin right at the beginning of the configuration that I don’t want to run the mail server, and restore all virtual servers.

We’ll see how it goes.

No more crazy processes after reinstalling the server. I know it’s quite radical but I now feel better.

Yeah. Nothing like knowing you have a clean, working system.

1 Like

I’m having the exact same problem. journalctl-u postfix*-u dovecot* & /usr/share/webmin/virtual-server/collectinfo.pl are literally using 100% of cpu most of the time.

Any way to fix it ?

1 Like

I’m experiencing the same:
Webmin 2.111
Virtualmin 7.10.0
Debian 12, 8Gb RAM

This seems to have started end of march. The CPU is regularly on 100%. Tonight the server crashed because too many of those processes stacked up. After a reboot, it directly started again.

I am using the mail-system, but the number of mails did not change significantly.

Anyone who had the same and was able to fix it? Why does this suddenly happen?

1 Like

This sounds like a different problem. A the OP indicated it was resolved in #9

https://forum.virtualmin.com/t/forum-guidelines-please-read-before-posting/56897

There was a bug in how journalctl logs were collected, which @Jamie fixed just a couple of weeks ago. We’re planning to release a small Virtualmin update to address this and a few other ongoing issues; hopefully pretty soon!

Thanks, looking forward to it :+1:

I can’t wait for this release ! My fresh install didn’t fix the problem even after I deactivated email features completely. It seems that the frequency of that process grows overtime. Check the graph on the picture.

For people like me who can’t wait for the update, here’s how to stop this if you don’t use Postfix and Dovecot.

  1. Kill postfix and dovecot
    sudo pkill postfix
    sudo pkill dovecot

  2. Clear logs (made me save 1.8gb, but careful as it will erase all logs)
    sudo journalctl --vacuum-time=1s

  3. Mask postfix and dovecot
    sudo systemctl mask postfix
    sudo systemctl mask dovecot

  4. Reboot the server.

After a few hours I can confirm my server is back to its normal CPU usage (around 4% with 6 websites totaling around 100 visits per day and 1 nextcloud instance).

2 Likes

Or you could have used webmin->system->bootup and shutdown check both dovecot and postfix then at the bottom of the page click the ‘Disable Now and On Boot’ button does the same thing nearly. This way of doing may suit people who don’t want to use the command line

I also found there’s a longstanding general performance issue with the journal when it has a lot of logs to process (so vacuuming is good for that). That’s not really directly related to this issue (we shouldn’t be trying to parse the whole danged thing in Virtualmin), but it can impact general performance of journalctl (note there have been several PRs merged that improves the situation, but older Linux distros will still have the older versions with known performance issues). Showing status of service via systemctl is slow (>10s) if disk journal is used · Issue #2460 · systemd/systemd · GitHub

1 Like

I started by doing it that way. Virtualmin said they were not running and wouldn’t start on boot, but after checking via the command line to see if they were running, I realized they were active. So, I recommend doing it this way to be sure to fix it completely. I’m a crazy fan of Virtualmin but a little bit of command line is always good for the brain and the server.

BTW, here’s a graph of my CPU usage almost one day after.