Webmincron.pl high memory usage

Hi there!

I have a VPS with 1GB RAM + 3GB Swap. Now and then (around weekly, but not every week), my server crashes because webmincron.pl goes up to 800MB RAM + 2-3G Swap. Usually there’s 0 to 1 webmincron.pl processes, however when this resource drain happens I see up to 30 of them.

It’s this one: /usr/share/webmin/webmincron/webmincron.pl

  • The webmin/virtualmin cron jobs are all default settings (from december 2019)

One solution might be to get more resources for my VPS, but I prefer minimizing the webmincron.pl usage! What to do next here?

You’ll need to use pstree and/or strace to see what it’s doing when it grows so large. That process runs all manner of scheduled jobs (and, is quite small itself)…it’s impossible to guess what the big one is.

You can pstree a specific process with pstree <pid-of-webmincron.pl

And, you can attach strace to a running process using the -p flag. e.g. strace -p <pid-of-webmincron.pl>

@Joe Thanks for the suggestion! Apologies for late reply from me. I tried to find pid of webmincron to use strace, but encountered that the process isn’t always running. Do you have any suggestions on how to log the calls and/or tree of a process that runs only periodically (now and then)?

If it doesn’t run long enough for you to look at it, it seems unlikely to cause any problems, whether memory or performance. Why do you think it’s a problem?

I suspect this is a case of “Linux ate my RAM” where you’re looking at virtual memory usage, which seems high, but resident size is completely normal. When you have a bunch of processes of the same program, like Webmin’s various jobs, they will share a lot of memory…all their shared library usage will be, well, shared.

I hear you. Webmincron does run long enough to look at it (up to 2-3 hours)… however I have no clue when it actually runs, and if it will run for 5min or an hour. It only seems to be using wild amounts of memory when it runs for an hour+. Up until now, I have been debugging why my VPS sometimes crashes because of out of memory through continuous logging with atop, and checking around times were the VPS stopped, and I’ve landed on webmincron being the issue.

About virtual memory vs residual, I’ve been speaking in residual memory. As mentioned, webmincron peaks at 800MB ram + 2-3GB swap, which crashes the system.

I hope that makes it clear why it’s a problem :slight_smile:! So my goal is to find out what it’s doing at those times, then make it behave

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.