2

I'm new to Ubuntu (installed it for the first time just a couple of days ago on my server). I've Ubuntu Server 10.04 and am just using the terminal, no GUI like Gnome. So far it's working pretty great except for one big thing.

Whenever I go to sleep and there's no activity on my server (it's not a big site so active users drop to 0 during the night), the server kind of disconnects. The only thing that can bring the site back online is to restart the whole server. I've tried disabling powersaving by using setterm but that changes nothing. Even if I wake up the server by pressing any key or so the site wont go back online!

I've tried just restarting both Apache and MySQL (I'm using LAMP-server btw) but not even that works. But as soon as I turn the power off and on at the server, everythings work like normal for a couple of minutes of inactivity (~5-15 minutes I'd guess) and then it's down again unless someone logs in to the site and is active.

I was previously using XAMPP on my laptop with Windows XP and that worked 24/7 so I don't think it's anything with my router or ISP.

This is driving me crazy! My site is down all the time I'm in school as I have no possibility to restart the server if it becomes offline. Does anyone have a clue to what could be wrong?

2 Answers 2

1

It sounds like the server is going into a standby mode, and then when it wakes up (in response to, say, keyboard input), its NIC fails to come up. Try going into the server's BIOS and disabling any powersaving features you find in there. The idea is to prevent the server from entering the standby mode in the first place.

If BIOS twiddling doesn't work, you should still be able to prevent the server from entering an idle/powersaving mode with a simple cron job that runs often enough. For example, here's how to have the server send a single ping to a well-known address (the Google DNS server 8.8.8.8) every minute:

sudo echo '* * * * * root /bin/ping -c 1  8.8.8.8  >/dev/null 2>&1' >/etc/cron.d/pinggoog
4
  • Disabling framebuffer didn't work either. As for the cron job. I did exactly as you said Steven and now has a file named "pinggoog" in "/etc/cron.d". The file contains this exact line: "* * * * * root /bin/ping -c 1 8.8.8.8 >/dev/null 2>&1" Is that correct? (I have not been able to see if it works yet as the members are currently active). Here's the website if that would be to any help at all (it's in swedish though): allblue.se
    – user57019
    Oct 14, 2010 at 9:41
  • Yes, that looks correct. Your server now has something to do every minute, which should keep it from ever entering standby mode. Oct 14, 2010 at 15:39
  • Not the most graceful solution, but it seems to be working! My website's been up two nights in a row now. Thanks a lot!
    – user57019
    Oct 16, 2010 at 8:11
  • Glad I could help! Oct 16, 2010 at 16:05
0

See if disabling framebuffer helps.

Add nomodeset kernel option in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"

Run update-grub

$ sudo update-grub

Reboot.

You must log in to answer this question.