2

Am pretty new to server administration. So I am not able to get to the root of the problem.

I am running Apache2 with mod_php on a 1GB Rackspace Cloud Server (Ubuntu 9.10). My site goes down often, and I have to restart apache2 to get the site working.

I checked the "error.log" file. There were no signs of any error messages. I even searched for words like [error] / error / warn / [warn] . But no results.

The site goes down and even then apache is running. When the site was down, the checked the status /etc/init.d/apache2 status and it gave ** * Apache is running (pid 433). **

Any suggestions where I should look for the problem.

Thanks a lot.

Shyam
  • 21
  • 1
  • 3

5 Answers5

1

change your LogLevel to debug

ghloogh
  • 1,039
  • 5
  • 9
1

my experience is that virtual servers often run out of memory. so you could reduce the amount of workers in your apache configuration.

also look into /var/log/syslog for OOM (out of memory manager) messages.

frisbee23
  • 75
  • 2
  • 10
  • Nothing useful found in syslog the workers config was: StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 Changed to StartServers 2 MinSpareThreads 15 MaxSpareThreads 45 ThreadLimit 32 ThreadsPerChild 15 MaxClients 70 MaxRequestsPerChild 0 Please correct if I have overdone anything. Thank you – Shyam Jul 15 '10 at 13:55
  • no, looks fine... – frisbee23 Jul 27 '10 at 12:01
0

try /var/log/messages and search for httpd related ones.

  • in that file, i just have 4 lines regarding 'rsyslogd' Something like - "rsyslogd was HUPed, type 'lightweight'." – Shyam Jul 15 '10 at 13:53
0

When the system goes down, what happens if you try and connect from the server itself? (i.e., use wget, curl, elinks, etc., to get the website from the same server's external address. If that doesn't work, try the loopback.) If either works, the problem is in your network - quite possibly a firewall.

Also check netstat -l to make sure that apache is still bound to port 80.

Scrivener
  • 3,106
  • 1
  • 20
  • 23
0

Have you tried issuing strace -p 433 to see what Apache is doing? (where 443 is the actual PID of the Apache process, I'm assuming your PID has changed.)

drewrockshard
  • 1,753
  • 4
  • 20
  • 27