Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a web server running on a EC2 c1.medium intance.

The instance is running on ubuntu, with apache2 and mysql.The ubuntu and apache version are the next;

Ubuntu
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"

Apache2
Server version: Apache/2.2.17 (Ubuntu)
Server built:   Feb 22 2011 18:33:02
  • Sometimes randomly, my server "hangs up", I cannot connect to it using normal web access or ssh access.

  • If I reboot the instance it reboots fine, the amazon system log doesn't show anything weird, but the problem persists

  • The only way to solve it its stopping the instance, and start it again.

I think that the problem its has something to do with apache, because the last lines of the error log lists:

normal errors
[Sun Jun 19 06:25:09 2011] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.5-1ubuntu7.2 with Suhosin-Patch configured -- resuming normal operations
nobody cant connetc... no more erros until i stop and start the instance

normal errors
[Wed Jun 22 14:21:18 2011] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.5-1ubuntu7.2 with Suhosin-Patch configured -- resuming normal operations
nobody cant connetc... no more erros until i stop and start the instance

Can somebody please help me?

share|improve this question
    
Did you add nobody cant connetc... no more erros until i stop and start the instance? Can you ping to your server if it "hangs"? –  Lekensteyn Jun 23 '11 at 19:12
    
Do you have server side code? Things like PHP can print things to the error log, and the poor grammar and spelling makes me wonder if the server side code is causing the problems. –  SpamapS Oct 15 '11 at 6:03
add comment

1 Answer

Tim, its probably time to add some instrumentation to your machine. I suggest at the very minimum something like sysstat to record snapshots of the system activity every 5 minutes. When you restart the machine, you can at least look at what was happening in the 5 minutes before the problem with the 'sar' command line utility.

Also have you tried looking at the instance's console? ec2-get-console-output i-xxxxxxxx may show some kernel problems if thats what is happening.

Also since you're on ec2 you should have cloudwatch available, does it show spikes in any stats when there are failures?

share|improve this answer
add comment

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.