Author |
|
djc
Joined: 04 Dec 2007 Posts: 37
|
Posted: Tue 04 Dec '07 8:20 Post subject: Apache 2.0 - 99% CPU - Random times |
|
|
Hello,
I'm running out of ideas with a problem on my box.
Win2k3
Apache 2.0.58
php 4.4.7
mysql 4.1.2.0
At random times, I get notified that my sites are down. I rdesktop into the box and Apache is at 99% CPU time.
Apache access logs show nothing of interest, nor does the error log.
Windows event view shows nothing.
The issue can last for 10 minutes or 2 hours.
If I stop the Apache service and restart it, it pegs at 99% again within a few minutes.
ideas? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 07 Dec '07 16:29 Post subject: |
|
|
only load needed moules in apache and php. check mysql server if it sends requests to apache.
You could try to run PHP as fastcgi (fcgi) to see if that is the issue. |
|
Back to top |
|
djc
Joined: 04 Dec 2007 Posts: 37
|
Posted: Sun 09 Dec '07 9:12 Post subject: |
|
|
only load needed moules in apache and php. - done
check mysql server if it sends requests to apache. - how do I check this?
You could try to run PHP as fastcgi (fcgi) to see if that is the issue. - will try this if necessary
The server has ran fine for over a year, this problem has been happening only recently (last month or so) and the box is generally dead.
Oddly, this happened last night. Here's some info from MRTG - Daily. I can't image its Apache fielding HTTP requests:
Max Average Current
16 workers 3 workers 2 workers
Max Average Current
3191 accesses/hour 1031 accesses/hour 601 accesses/hour
Max Average Current
14 kB/s 1771 B/s 1561 B/s |
|
Back to top |
|
djc
Joined: 04 Dec 2007 Posts: 37
|
Posted: Wed 30 Jan '08 12:35 Post subject: |
|
|
I installed 2.2.8 to see if the problem was related to the executable. I copied the conf file over, made the appropriate changes, etc. Switched over to 2.2.8. All was well then boom, 99% cpu again.
ANY ideas how to get a lead? I was guessing a DOS attach, however the busyworkers do not exceed 20... |
|
Back to top |
|
Kanashii
Joined: 17 Jul 2006 Posts: 155 Location: Porando
|
Posted: Wed 30 Jan '08 12:58 Post subject: re |
|
|
TRY DEBUG:
DOWNLOADS "procexp.exe" on google and check precess yoau can iven t check TCP attivation
DOWNLOADS "Filemon.exe" and find what file are open
IF you think this is d.o.s
DISABLED PING IN FIREWALL
DOWNLOADS HARDENIT AND SECUREIT |
|
Back to top |
|
djc
Joined: 04 Dec 2007 Posts: 37
|
Posted: Sat 02 Feb '08 15:19 Post subject: |
|
|
will do.
thanks |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Thu 07 Feb '08 16:21 Post subject: |
|
|
I actually just got the same problem... Site was slow so I checked and apache was using 99% CPU... I can't find anything in the errors... I restarted and it seems fine for now.
In process explorer in the TCP connections I noticed an IP from some foreign country and it would not disappear but when I search for that IP in the access.log files, I could not find it anywhere. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 07 Feb '08 17:31 Post subject: |
|
|
Thog wrote: |
In process explorer in the TCP connections I noticed an IP from some foreign country and it would not disappear but when I search for that IP in the access.log files, I could not find it anywhere. |
Maybe that is a scanning of your system. Tools like nmap make only 2 steps of the 3- handshake(explaination.
So there is nothing in the error log. Or it is a (D)DOS Attack with SYN/ACK Flooding. |
|
Back to top |
|
djc
Joined: 04 Dec 2007 Posts: 37
|
Posted: Mon 24 Mar '08 6:39 Post subject: |
|
|
I still have this issue.
If it is what James suggests, how is this verified and remedied? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 24 Mar '08 10:00 Post subject: |
|
|
verifing that is very easy. Unplug the networkwire (if you can) than it should be less CPU usage.
A second idea is heavy mysql action between the mysql deamon and apache (php)
I recommend you to upgrade to Apache 2.2.x which is better designed for Windows. A lot of bugs from 2.0 are gone. |
|
Back to top |
|
djc
Joined: 04 Dec 2007 Posts: 37
|
Posted: Sat 29 Mar '08 6:27 Post subject: |
|
|
Thanks for the reply James.
I actually have 2.2.x installed (downloaded from here) and set it up figuring it was an issue with my installation of Apache or 2.0 in general. The problem remained.
Unfortunately, I can't unplug the cable. The box is remotely hosted. |
|
Back to top |
|
navbeacon
Joined: 17 Jan 2008 Posts: 4
|
Posted: Sun 30 Mar '08 14:41 Post subject: |
|
|
I have the same issue.
Apache/2.2.8 (Win32) PHP/5.2.5 mod_aspdotnet/2.2.
Apache randomly peaks at 99% CPU and stays there. I see nothing in the logs. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3094 Location: Hilversum, NL, EU
|
Posted: Sun 30 Mar '08 17:58 Post subject: |
|
|
Try in your httpd.conf:
Win32DisableAcceptEx
EnableSendfile Off
EnableMMAP off
Maybe it helps.
Steffen |
|
Back to top |
|
navbeacon
Joined: 17 Jan 2008 Posts: 4
|
Posted: Mon 31 Mar '08 17:24 Post subject: |
|
|
I fixed it by installing the latest network card drivers.
Look on your motherboard/network vendor web site. |
|
Back to top |
|
djc
Joined: 04 Dec 2007 Posts: 37
|
Posted: Sun 06 Apr '08 7:46 Post subject: |
|
|
what kind of network card do you have? |
|
Back to top |
|