
01-11-2006, 09:30 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Feb 2003
Location: Portland, OR
Posts: 80
|
|
Apache process using 100% of CPU
Multiple times daily there is an apache process that hangs and uses 100% of the CPU (it's a dual xeon). It is apache and not PHP, so I don't know how to identify what's causing the problem. Other apache processes come and go just fine while that one process continues to hang.
If I simply restart apache, everything will run fine.
How do I determine what's causing this apache process to hang?
|

01-11-2006, 09:37 PM
|
|
Newbie
|
|
Join Date: Jan 2004
Posts: 21
|
|
It's php for sure, in apache scripts.
Try to install Zend or eaccelerator and optimize the my.cnf (mysql) configuration file.
|

01-11-2006, 09:47 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Feb 2003
Location: Portland, OR
Posts: 80
|
|
Paco-
Mysql is well optimized, and being that the only site on the server is the site I myself coded, I'm confident in saying there's no PHP bug or issue causing the hang.
Rather then just throwing a blanket over this, I want to figure out exactly what is causing the process to hang.
Anyone else know how to identify this?
Thanks.
|

01-11-2006, 10:38 PM
|
|
Web Hosting Guru
|
|
Join Date: Jul 2002
Location: Florida
Posts: 285
|
|
Never seen it before, try recompiling and see if that helps
__________________
Mark
|

01-11-2006, 11:19 PM
|
|
Disabled
|
|
Join Date: Dec 2005
Posts: 105
|
|
Quote:
|
Originally Posted by k2host
Multiple times daily there is an apache process that hangs and uses 100% of the CPU (it's a dual xeon). It is apache and not PHP, so I don't know how to identify what's causing the problem. Other apache processes come and go just fine while that one process continues to hang.
If I simply restart apache, everything will run fine.
How do I determine what's causing this apache process to hang?
|
find out the pid of the apache process and and do an strace (strace -p pid). You should able to find something interesting.
|

01-12-2006, 03:42 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Feb 2003
Location: Portland, OR
Posts: 80
|
|
Okay, it happened again and I strace'd it this time:
Code:
munmap(0x6086000, 4993024) = 0
fcntl64(16, F_SETFL, O_RDWR|O_NONBLOCK) = 0
read(16, 0x97c2580, 8192) = -1 EAGAIN (Resource temporarily unavailable)
fcntl64(16, F_SETFL, O_RDWR) = 0
write(16, "f\0\0\0\3select index_id, index_name"..., 106) = 106
read(16, "\233\0\0\1", 4) = 4
read(16, "\377(\4#42000You have an error in yo"..., 155) = 155
mmap2(NULL, 4993024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6086000
munmap(0x560e000, 4993024) = 0
fcntl64(16, F_SETFL, O_RDWR|O_NONBLOCK) = 0
read(16, 0x97c2580, 8192) = -1 EAGAIN (Resource temporarily unavailable)
fcntl64(16, F_SETFL, O_RDWR) = 0
write(16, "f\0\0\0\3select index_id, index_name"..., 106) = 106
read(16, "\233\0\0\1", 4) = 4
read(16, "\377(\4#42000You have an error in yo"..., 155) = 155
mmap2(NULL, 4993024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x560e000
Now, I can decipher that there appears to be an SQL error and a response of "Resource temporarily unavailable".. But I can't identify what exactly is causing the problem still. The site is still operating just fine with no sql errors when browsing it.
Any ideas?
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|