You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marco Aimar <ma...@foreach.it> on 2011/01/24 13:04:51 UTC

[users@httpd] high cpu process

Hy,
I'm use apache 2.2.2.
Casually I find which some process use very high cpu.
This is a "top"
> 21213 wwwrun    20   0  297m  18m 4660 R   98  0.5 100:05.76 httpd2-prefork                                                                                                     
> 21149 wwwrun    20   0  297m  19m 5180 R   96  0.5  97:15.34 httpd2-prefork                                                                                                     
> 20882 wwwrun    20   0  298m  19m 5464 R   95  0.5  96:38.06 httpd2-prefork                                                                                                     
> 20700 wwwrun    20   0  297m  20m 5880 R   94  0.5 101:04.42 httpd2-prefork

Cpu used for first reported process it's 98%.
There is a one way for know why this appear?
I think it's some attack or some process php but I can not trace the origin.

Thank you, Marco


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high cpu process

Posted by Marco Aimar <ma...@foreach.it>.
Il giorno 24/gen/2011, alle ore 14:20, Eric Covener ha scritto:
> 
> http://httpd.apache.org/dev/debugging.html#backtrace
> 
> You can also see what files it has opens with e.g. lsof, though I'm
> not sure if that helps with php.
> 
> -- 
> Eric Covener
> covener@gmail.com

Thank you, I will read that page.
I've used "lsof" but don't help me.
I've multiple virtual host and it show all log file and I don't find a problem source.

Thank's

Re: [users@httpd] high cpu process

Posted by Eric Covener <co...@gmail.com>.
On Mon, Jan 24, 2011 at 7:04 AM, Marco Aimar <ma...@foreach.it> wrote:
> Hy,
> I'm use apache 2.2.2.
> Casually I find which some process use very high cpu.
> This is a "top"
>> 21213 wwwrun    20   0  297m  18m 4660 R   98  0.5 100:05.76 httpd2-prefork
>> 21149 wwwrun    20   0  297m  19m 5180 R   96  0.5  97:15.34 httpd2-prefork
>> 20882 wwwrun    20   0  298m  19m 5464 R   95  0.5  96:38.06 httpd2-prefork
>> 20700 wwwrun    20   0  297m  20m 5880 R   94  0.5 101:04.42 httpd2-prefork
>
> Cpu used for first reported process it's 98%.
> There is a one way for know why this appear?

http://httpd.apache.org/dev/debugging.html#backtrace

You can also see what files it has opens with e.g. lsof, though I'm
not sure if that helps with php.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high cpu process

Posted by Marco Aimar <ma...@foreach.it>.
Il giorno 24/gen/2011, alle ore 13:32, Mark Watts ha scritto:
> Things to look at:
> 
> - - Number of connections in state ESTABLISHED
> 	(netstat -aln | grep ESTABLISHED)
> - - Compare above with number of hits in your access.log
> - - Any errors in the error.log?
> - - PHP->Database connection tuning?
> 	(Database should be able to support MaxClients connections)
> - - Whats the I/O load of the system?
> 	(iostat)
> 
> Mark.

Actually i've killed a process because total load was very high.
When it's happean, I try that.

Usually, connections and DB (locally) are very low. I don't think are this a problem.
When this happean, network band it's low too.
I think which problem it's one php script inside one page (example it do a infinite loop) but I don't know how find it.

Thank you.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] high cpu process

Posted by Mark Watts <m....@eris.qinetiq.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/24/2011 12:04 PM, Marco Aimar wrote:
> Hy,
> I'm use apache 2.2.2.
> Casually I find which some process use very high cpu.
> This is a "top"
>> 21213 wwwrun    20   0  297m  18m 4660 R   98  0.5 100:05.76 httpd2-prefork                                                                                                     
>> 21149 wwwrun    20   0  297m  19m 5180 R   96  0.5  97:15.34 httpd2-prefork                                                                                                     
>> 20882 wwwrun    20   0  298m  19m 5464 R   95  0.5  96:38.06 httpd2-prefork                                                                                                     
>> 20700 wwwrun    20   0  297m  20m 5880 R   94  0.5 101:04.42 httpd2-prefork
> 
> Cpu used for first reported process it's 98%.
> There is a one way for know why this appear?
> I think it's some attack or some process php but I can not trace the origin.

Things to look at:

- - Number of connections in state ESTABLISHED
	(netstat -aln | grep ESTABLISHED)
- - Compare above with number of hits in your access.log
- - Any errors in the error.log?
- - PHP->Database connection tuning?
	(Database should be able to support MaxClients connections)
- - Whats the I/O load of the system?
	(iostat)

Mark.

- -- 
Mark Watts BSc RHCE
Senior Systems Engineer, MSS Secure Managed Hosting
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk09cV8ACgkQBn4EFUVUIO1UcgCfcFCXU+H22z3y5XEE8VLhmtwY
cBIAoIDC0ovEbmAzDkdLx2A6TqSMTdA4
=okN1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org