Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a Debian virtual server with Apache, PHP, MySQL. There is just 1 website with very low traffic running but the server very often (almost everyday) freezes and does not respond.

When this happens the server is unreachable from web browser or by SSH and I have to go to administration of my provider and perform server hard reset after this the server seems to work fine.

How can I find out what is causing the freezes?

Linux vm2797 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 GNU/Linux

share|improve this question
If it isn't already installed, I would install something like atsar. Which is a tool that will periodically collect various statistics. This may give you a useful hint. For example if your RAM usage maxes out you probably have something with a memory leak. – Zoredache Sep 26 '12 at 17:34

If you don't see anything in your /var/log/syslog or /var/log/messages files, I recomend you to use any system status record tool. I use nmon (in capture data mode) to monitoring my systems.

You can find it here

share|improve this answer

Reconfigure your syslog to go to a different server -- this pushes events, any monitoring polls the server (probably miss the big segfault unless you poll at the exact instant it happens).

Grabbing logs to the machine that's crashing is a bad idea -- you will always lose the most import (read last) lines of the logs.

man rsyslog.conf gives info on redirecting to another machine, and how to configure to listen for logging messages.

The logs will show up in the syslog of the host prefaced with the name of the server they came from.

On the listening side 'man rsyslogd' will give you startup options which can then be set in /etc/default/rsyslog (you may need -4 or -6). You can verify it's listening with lsof -p pid_of_rsyslogd

share|improve this answer

The thing to do here is to look in your logs. They're usually found in /var/log. Make a note of the time you restart your system and look in the logs for messages immediately before that time.


would be good places to start.

share|improve this answer
  • Use a kdump-kernel.
  • Have your VM-Admin snapshot your VM including memory for forensic analysis.
  • Enable SysRQ and have your VM/Console-Admin issue the sync-command so logs get written to disk
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.