Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have a ubuntu ec2 micro instance where I have setted up LAMP environment with mysql/phpmyadmin as well. However, my application in every few days getting 'database connectivity issue' and when I reboot the instance, it gets back normal.

When I login to terminal in such situation I can see a message as below:

*** /dev/xvda1 will be checked for errors at next reboot ***

Do anyone have any idea why this is happening and what I can do to avoid such problem? Thanks.

share|improve this question

migrated from Jun 6 '13 at 22:32

This question came from our site for pro webmasters.

Look at your logs to find out what's happening. – Michael Hampton Jun 6 '13 at 22:41

Every time somebody logs in the pam_motd module runs all the scripts in /etc/update-motd.d/. One of these scripts is 98-fsck-at-reboot which runs /usr/lib/update-notifier/update-motd-fsck-at-reboot. In essence this script, for each ext filesystem, checks the mount count against the maximal mount count and the last fsck against the check interval to determine if a filesystem needs to be fscked, and, if so, outputs text that gets added to /etc/motd

When a system boots, upstart examines /etc/init/mountall.conf and runs mountall, which runs fsck on the filesystems if the conditions stated in the previous paragraph are met.

As you can see these goings-on are not triggered by detected errors and so probably have nothing to do with your database connectivity issues.

Most likely you are exhausting a resource (I'm guessing memory) on your micro instance and a reboot causes resource consumption to be reset. If you don't wish to troubleshoot it any further I'd upgrade to at least a small instance.

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.