Virtualmin interface hungs after a while

10 posts / 0 new
Last post
#1 Sat, 12/17/2016 - 09:10
TestaDiLatta
TestaDiLatta's picture

Virtualmin interface hungs after a while

Hi! I'm new here.

I'm currently testing a new virtualmin installation on Amazon EC2.

Everything works like a charm except the fact that after a while the Virtualmin interface is not reachable anymore. While the interface on port :10000 is not reachable all other systems are up and running including Apache's virtual servers, MySQL and FTP.

If i reboot the EC2 instance then the Virtualmin interface is reachable again and it does not hang while i'm using it.

What i can do to resolve this problem? Maybe there is a standby feature that i can't find?

Thanks in advance for your help!

Fri, 12/30/2016 - 03:04
Masplus

Hello !

Yes, unfortunantly this is "typicall" with Webmin + Virtualmin... during some heavy loads ( short heavy loads too ) the first process to be killed in the system is Webmin service.

My recommendation is install "monit" and follow the instructions to check webmin services. And if you want it, check all other services like Apache2, MySQL, SSH, etc... you have all config examples in this website

https://mmonit.com/wiki/Monit/ConfigurationExamples

Fri, 12/30/2016 - 03:08 (Reply to #2)
Joe
Joe's picture

It is not typical at all. I've never seen the behavior described, except when there were reasons for it to shut down (memory, hardware problems, etc.).

--

Check out the forum guidelines!

Fri, 12/30/2016 - 03:18 (Reply to #3)
Masplus

We got this problems with servers with one or two webistes, load under 0.20 , and all with SSD, but the problem was completly random, under no load we got the problem too ( OOM Killer ). It is also true that in version 5.X does not happen as much or very rarely.

Ty for the reply. We will wait for TestaDiLatta reply.

Fri, 12/30/2016 - 05:40 (Reply to #4)
Joe
Joe's picture

There's something other than Webmin/Virtualmin causing it...Webmin may have flaws, but reliability is not one of them. It'll run for years.

The OOM killer picks the least recently used thing to kill...and there's nothing the process it kills can do about it. So, if you've got an out-of-memory error and the kernel kills Webmin, it's not a fragility in Webmin; the kernel made it shut down because there wasn't enough memory available to keep everything running.

The solution to OOM killer errors is to increase memory or add swap to the system. Or, reduce the number or size of services you have running.

There's a document about reducing memory usage on Virtualmin systems: https://www.virtualmin.com/documentation/system/low-memory

--

Check out the forum guidelines!

Fri, 12/30/2016 - 03:11
Joe
Joe's picture

Are there any errors in the Webmin logs (those live in /var/webmin)? miniserv.error is probably where I'd look first.

Is there a chance the OOM killer is kicking in and killing the Webmin process? You can check the kernel log (dmesg) for out-of-memory related messages.

Without rebooting the instance, does simply restarting the Webmin service help?

e.g.

# service webmin restart

--

Check out the forum guidelines!

Fri, 01/20/2017 - 03:03
TestaDiLatta
TestaDiLatta's picture

Hi! Sorry for my late reply.

Thanks for your responses!

I made some tests, I cleaned the logs and waited for the crash.

After the "connection_refused" error I checked the logs. Nothing relevant in miniserv.error but there was many out of memory errors in kern.log

Jan 20 05:07:07 cantoreggi kernel: [106363.510204] Out of memory: Kill process 5256 (clamd) score 443 or sacrifice child
Jan 20 05:07:07 cantoreggi kernel: [106363.515126] Killed process 5256 (clamd) total-vm:682204kB, anon-rss:446972kB, file-rss:1508kB

So, basically this machine don't have enough RAM. I don't use email service, can i safely disable ClamAV?

Without rebooting the instance, does simply restarting the Webmin service help? e.g. # service webmin restart

Yes, restarting the Webmin service works as espected.

Fri, 01/20/2017 - 03:11 (Reply to #7)
Masplus

Ok, it seems to be that you said, "So, basically this machine don't have enough RAM".

If you don't use email service, you can disable all services related with email, including ClamAV.

Mon, 01/23/2017 - 09:28
TestaDiLatta
TestaDiLatta's picture

I disabled dovecot, clamav-daemon, clamav-daemon.socket and clamav-freshclam. Now the problem seems to be solved.

Thanks a lot Masplus and Joe!

Mon, 01/23/2017 - 09:38 (Reply to #9)
Masplus

Nice ! Also, I would recomend you to install Monit, as I said on my first reply. This software does his job really well.

Topic locked