logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: 100% cpu load from apache (PHP related ?)
Author
Shekhar



Joined: 30 Jan 2012
Posts: 5
Location: India

PostPosted: Mon 20 Feb '12 23:33    Post subject: 100% cpu load from apache (PHP related ?) Reply with quote

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

PostPosted: Tue 21 Feb '12 20:34    Post subject: Reply with quote

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

PostPosted: Tue 21 Feb '12 21:12    Post subject: Reply with quote

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

PostPosted: Wed 22 Feb '12 11:30    Post subject: Reply with quote

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

PostPosted: Sun 26 Feb '12 20:32    Post subject: Reply with quote

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

PostPosted: Mon 27 Feb '12 16:26    Post subject: Reply with quote

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

PostPosted: Thu 01 Mar '12 1:33    Post subject: Reply with quote

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

PostPosted: Thu 01 Mar '12 14:50    Post subject: Reply with quote

ini_set RTFM Wink
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

PostPosted: Thu 01 Mar '12 22:24    Post subject: Reply with quote

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 Wink
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


Reply to topic   Topic: 100% cpu load from apache (PHP related ?) View previous topic :: View next topic
Post new topic   Forum Index -> Other Software