Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Debian 6 Xen guest that seems to go to sleep from time to time. Randomly, it just stops to answer to any network requests (HTTP, ssh, ping) and only resumes activity when we log on the console. The server is clearly not crashed, however during this sleeping time no activity happens, even all the logs (syslogd and klogd) remain blank during this time.

Depending on when it happens and when we can actually log on the console, a few minutes but sometimes even an hour can be spent into this mode. This behavior happens irregularly, about once a month, randomly.

I don't have access to the console nor to the Xen host myself, but the support team from the hosting company is saying nothing suspicious is shown. They say it's the only guest on their infrastructure exhibiting this behavior.

The guest runs a linux 2.6.29.6 kernel compiled by the hosting company, has 2 cores, 4 GB of RAM and 2 GB of swap. 5-mins average load is not low (between 2 and 3, with peaks up to 5), but the swapping activity is low (swapin/swapout) and the swap space barely used. No kernel messages are spotted in the logs, nor in the dmesg output.

This server is running regular apache + mod_php and proftpd, really nothing fancy. AFAICT we've not tweaked any clock related parameters of the kernel (however I'm not sure how I can check the kernel setup if an energy saving mode or clock stepping is activated or not).

We're running out of clues at where the issue comes from.

Edit: I've run find /var -mmin -beforeevent -mmin +afterevent to try to find any file being modified during the last time the server hang and all that find reported was file being modified just before or just after the event, but nothing in between, even when it was a 1 hour long hang. This server only have a single partition, so it's not like only the disk containing /var was down.

I also have other hosts on the same subnet and all see this server as being offline: snmp polling fails and no requests are logged on the DB host from any PHP application running on the sleeping server.

We also tried to setup some cronjob to do continuous activity (like pinging some other host continuously), that didn't prevented this server to enter this sleep mode.

share|improve this question
    
Is it possible for you to ask your hosting company to type 'xm resume vmname' next time this happens? Might give you some clues about the problem if it resumes activity. –  coincoin Aug 17 '12 at 17:05
    
I can ask for that, yes. It will probably need a bit of time (a few weeks...) before that happens again though. –  Tonin Aug 17 '12 at 17:46
    
you can also set up this cron job, it might give clues about what is happening when server is unreacheable (network and disks still working or not). 1) Type netstat -nr 2) * * * * * root ping -c 1 IPOFTHEGATEWAY >> /root/temporarylogfile 2>&1 –  coincoin Aug 17 '12 at 18:00
    
There is definitely no activity going on when this happens. I have other servers in the same subnet and they cannot reach this server when it happens (snmp polling) and the server makes no activity (no requests to the DB host). The server itself doesn't touch a single file during this sleeping time, I've just done a find /var -mmin -315 -mmin +210 -ls (-315 ~ +210 catching the last time the server fell asleep) and this reports only files being modified just before the event and just after. –  Tonin Aug 17 '12 at 18:24

1 Answer 1

up vote 0 down vote accepted

For what it's worth, I suspect this issue was related to no ntp usage in the VM. The VM time drifted away from the host time and probably caused the server to enter sleep mode.

After installing and using ntpd, I had no other similar incident. However, I don't have this exact server anymore and have not been running with ntp enabled for a very long time (only 2 or 3 months). Hence the reason why I cannot say it was the very solution to this problem.

share|improve this answer

Your Answer

 
discard

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.