httpd taking 100% of CPU!

Problems with the Linux version of XAMPP, questions, comments, and anything related.

httpd taking 100% of CPU!

Postby rollex » 03. October 2011 19:57

Hi,

I have been trying to find a solution for my problem, but only found help for XAMPP for Windows. I'm using lampp and have not found anything related to my problem, not from this forum and not by googleing.

I'm using openSUSE 11.4. These have not helped so far:

- Disabling firewall (I don't use susewall at all, I use only denyhosts but it has nothing to do with apache right?)
- /opt/lampp/lampp restart - as soon as apache is restarted, httpd process spawn again 100%!
- Rebooting computer - as soon as apache is restarted, httpd process spawn again 100%!
- Editing Win32DisableAcceptEx to /opt/lampp/etc/httpd.conf but I guess this is Windows thing because apache won't start if I add this
- Checking out scripts - nothing would indicate any errors
- Updated from 1.7.4 to 1.7.7 just now and it went fine. No effect on this problem!

How to debug this and what is causing this? It has been continuing very long time, but it does not seem to affect in the system functionality. Like it shows up 100%, but it's not? I'm so confused...

EDIT: Oh and the picture from my conky setup:
Image
rollex
 
Posts: 3
Joined: 03. October 2011 19:50

Re: httpd taking 100% of CPU!

Postby JonB » 03. October 2011 23:03

have you looked at your logfiles???

maybe httpd IS that busy :shock:

just a thought
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: httpd taking 100% of CPU!

Postby rollex » 04. October 2011 11:09

How can it be all the time, 24/7 for days and weeks straight without any pause in CPU stats? It's always 100%, definitely not normal. access_log seem pretty big, figuring it out now... no clue in other logs.
rollex
 
Posts: 3
Joined: 03. October 2011 19:50

Re: httpd taking 100% of CPU!

Postby JonB » 04. October 2011 11:21

First question -

Is the machine unresponsive? At those levels is should be at least 'slow' to serve pages.

I'm not seeing much in the way of transfers - so that is weird. Nor is your memory being eaten up.

There are a couple of other possible explanations -

One very simple explanation would be 'the tool is the problem'.

Its also possible you have some code that loops endlessly.

Definitely weird, I'll agree.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: httpd taking 100% of CPU!

Postby rollex » 04. October 2011 11:27

JonB wrote:Its also possible you have some code that loops endlessly.


Thanks for the tip! It was one of my php/ajax scripts that looped... access_log told about it. disabling the script solved the problem! No, the machine was normally functioning, no other problems than httpd filling up process logs. This case is now solved, remember always to check your scripts ;)
rollex
 
Posts: 3
Joined: 03. October 2011 19:50

Re: httpd taking 100% of CPU!

Postby JonB » 04. October 2011 15:04

Glad it is fixed -

BUT -
remember always to check your scripts


really should be

Always remember to check your logfiles :lol:


Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: httpd taking 100% of CPU!

Postby americanimage » 05. October 2011 00:06

I completely agree! I had an issue with a script a while ago that was causing the same looping type error, and honestly the logfile (even though it should have been first) was at least an hour into troubleshooting.

Course, when your up and coding at 4am with no sleep, sometimes an outsider's perspective REALLY helps! That, sleep, and coffee. :)
Trade Show Displays
http://www.american-image.com/
americanimage
 
Posts: 1
Joined: 04. October 2011 23:57


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 71 guests