Author |
|
Shekhar
Joined: 30 Jan 2012 Posts: 5 Location: India
|
Posted: Mon 20 Feb '12 23:33 Post subject: 100% cpu load from apache (PHP related ?) |
|
|
Hi! I am having a big problem, All of a sudden my Apache server was using 100% of CPU and it is still continuing time-to-time. But, recently, everything was fine.
I am on windows with:
Intel® Core™2 Duo T5500 (2*1,66Ghz),
2GB RAM
Any help?
Thnx |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 21 Feb '12 20:34 Post subject: |
|
|
Only apache? Running any dynamic content like, php or perl?
OS?
Apache version? |
|
Back to top |
|
Shekhar
Joined: 30 Jan 2012 Posts: 5 Location: India
|
Posted: Tue 21 Feb '12 21:12 Post subject: |
|
|
I'm running dynamic content too!
Full Details:
Apache version:2.2.x
PHP version:5.2.x
Perl version:5.2.x
OS: windows server 2003
Thnx |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 22 Feb '12 11:30 Post subject: |
|
|
Are you running PHP as module? Running Perl also as module?
Is there anything related to this crash in your apache error log? Anything in the Windows event log?
Why are you running still PHP 5.2? It is no longer supported. However I think that maybe some PHP extension causes this.
In your access log, do you see any request that takes much longer than others? |
|
Back to top |
|
Shekhar
Joined: 30 Jan 2012 Posts: 5 Location: India
|
Posted: Sun 26 Feb '12 20:32 Post subject: |
|
|
Sorry about my late reply,
I got some guys around my place who helped me by keeping settings some precision backtrack limitation over the php.
So, if there is high load on apache the server will be safe.
Thanks
James Blond wrote: | Are you running PHP as module? Running Perl also as module?
Is there anything related to this crash in your apache error log? Anything in the Windows event log?
Why are you running still PHP 5.2? It is no longer supported. However I think that maybe some PHP extension causes this.
In your access log, do you see any request that takes much longer than others? |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 27 Feb '12 16:26 Post subject: |
|
|
Shekhar wrote: |
I got some guys around my place who helped me by keeping settings some precision backtrack limitation over the php.
|
It would be nice, if you could share how you solved that. |
|
Back to top |
|
Shekhar
Joined: 30 Jan 2012 Posts: 5 Location: India
|
Posted: Thu 01 Mar '12 1:33 Post subject: |
|
|
Check a bit about this:
@ini_set( 'pcre.backtrack_limit', '8M' );
if set no more than 8M site could go on
Or,
@ini_get( 'pcre.backtrack_limit', '2M' );
It will get only 2M
But, as I said, I'm not expert, I got this way from other guys...
You know about this function, don't you??
It would be nice, if you could share how you solved that.[/quote] |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 01 Mar '12 14:50 Post subject: |
|
|
ini_set RTFM
it just changes values from your php.ini during runtime of the script.
ini_get reads the value.
So this changes the pcre.backtrack_limit. PCRE's recursion limit. That is about all pcre_* functions you use in your scripts. |
|
Back to top |
|
Shekhar
Joined: 30 Jan 2012 Posts: 5 Location: India
|
Posted: Thu 01 Mar '12 22:24 Post subject: |
|
|
There is no other solution that I got from any where so anything extra you would like to suggest plz!!
James Blond wrote: | ini_set RTFM
it just changes values from your php.ini during runtime of the script.
ini_get reads the value.
So this changes the pcre.backtrack_limit. PCRE's recursion limit. That is about all pcre_* functions you use in your scripts. |
|
|
Back to top |
|