[Solved] Server hangs

9 posts / 0 new
Last post
#1 Thu, 07/11/2013 - 14:35
ki44321

[Solved] Server hangs

Hi! 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?

Thanks!

Thu, 07/11/2013 - 22:47
andreychek

Howdy,

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.

-Eric

Fri, 07/12/2013 - 01:32 (Reply to #2)
ki44321

Logs before server crashed:

http://shansik.pp.ua/var_log_messages.txt
http://shansik.pp.ua/var_log_syslog.txt
http://shansik.pp.ua/var_log_kern.txt

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

Fri, 07/12/2013 - 08:02
andreychek

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?

-Eric

Fri, 07/12/2013 - 10:39 (Reply to #4)
ki44321

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

Fri, 07/12/2013 - 13:24
andreychek

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

Thanks!

-Eric

Sun, 07/14/2013 - 02:25 (Reply to #6)
ki44321

# 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!

Sun, 07/14/2013 - 07:01
Locutus

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€. :) (I could use more customers on my servers.)

Sun, 07/14/2013 - 09:48 (Reply to #8)
ki44321

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