hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Apache process using 100% of CPU
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Apache process using 100% of CPU

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 01-11-2006, 09:30 PM
k2host k2host is offline
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?

__________________
K2Host.net - personal. affordable. hosting.
Web Hosting - VPS Hosting

Reply With Quote


Sponsored Links
  #2  
Old 01-11-2006, 09:37 PM
Paco Paco is offline
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.

Reply With Quote
  #3  
Old 01-11-2006, 09:47 PM
k2host k2host is offline
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.

__________________
K2Host.net - personal. affordable. hosting.
Web Hosting - VPS Hosting

Reply With Quote
Sponsored Links
  #4  
Old 01-11-2006, 10:38 PM
submenu submenu is offline
Web Hosting Guru
 
Join Date: Jul 2002
Location: Florida
Posts: 285
Never seen it before, try recompiling and see if that helps

__________________
Mark

Reply With Quote
  #5  
Old 01-11-2006, 11:19 PM
Doctorbob Doctorbob is offline
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.

Reply With Quote
  #6  
Old 01-12-2006, 03:42 PM
k2host k2host is offline
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?

__________________
K2Host.net - personal. affordable. hosting.
Web Hosting - VPS Hosting

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53
Apache Web Server Adds Cloud Capabilities with First Major Update in 5 Years Web Hosting News 2012-02-21 16:05:02
The Apache Software Foundation Launches Hadoop v1.0 Web Hosting News 2012-01-05 18:29:16
Oracle is the Latest Vendor to Apply Patch for Apache Killer Flaw Web Hosting News 2011-09-19 14:43:58
Patch Released for Apache Software DDoS Vulnerability Web Hosting News 2011-08-26 15:03:10


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?