[Solved] Server hangs

Virtual server with Debian 6.0 and Virtualmin 4.01.gpl

Sometimes the server hangs, and only rebooting helps.
Apache and ssh doesn’t work.

It seems that one of the sites crashed server.
What logs should I check?



You may need to review a number of logs around the time the server is hanging to get an idea of what’s going on… a good place to start though would be to look at /var/log/kern.log, /var/log/syslog, and /var/log/messages.

I’d be looking for signs of a hardware problem, as well as signs of the server being in some kind of stress, such as running out of memory.


Logs before server crashed:


Can this logs help to detect the site, that crashed server?

Hmm, how much RAM does your server have? You can determine that by running “free -m”.

Also, is this a VPS, or a dedicated server?


It’s hetzner virtual server - vServer VQ 12 with 1024 MB RAM.

Usually, virtualmin shows:
Real memory 1002.91 MB total, 851.45 MB used

Can you share the output of “free -m”? That contains some additional info that’ll be helpful in troubleshooting.



free -m

         total       used       free     shared    buffers     cached

Mem: 1002 833 169 0 26 101
-/+ buffers/cache: 705 297
Swap: 2047 125 1922

Thank you for helping!

Clearly the crash was caused by a low memory situation; judging by the OOM messages in your logs.

Hetzner uses hardware virtualization, so the memory limits you see are hard limits and guaranteed. You might want to install “atop”, which records historical performance data, and see which processes use up too much RAM when a crash occurs, or maybe you can see right away what uses too much RAM.

Turning off the resident spam and virus filter helps save memory. But it’s possible that certain web pages use too much memory for PHP processes.

Another way to go: update to 2+ GB memory. I can offer you a virtual machine with 2 GB memory on my Hetzner-hosted, guaranteed not over-committed, VMware root server, for 15€ as opposed to Hetzner’s 20€. :slight_smile: (I could use more customers on my servers.)

Thanks, for atop, great program.
Thanks, for discount, I will remember your suggestion