You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "D'Arcy J.M. Cain" <da...@Vex.Net> on 2016/05/09 18:16:58 UTC

[users@httpd] One page hanging entire server

This weekend at various times my server was brought down.  I saw one
process using over 99% of the CPU.  No pages could be served while this
was going on.  I found the culprit.  It was a Wordpress site and the
script was wp-cron.php.  I stopped it by adding a line to wp-config.php
as http://geektnt.com/how-to-solve-wp-cron-php-high-cpu-usage.html and
other sites suggested.

However, I am still confused how this one process was able to block all
other pages.  I have MaxClients set to 100 and 15 other cores that they
can be run on.  Why didn't my server continue to serve requests?

Thanks for any insight.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] One page hanging entire server

Posted by Frank Gingras <fr...@gmail.com>.

On 09/05/16 05:45 PM, D'Arcy J.M. Cain wrote:
> On Mon, 09 May 2016 16:26:19 -0400
> C> What kind of response were you getting from your server when you
>> connected with another client? Timeout? 503? 500?
>
> That's the point, they time out even if it is not a Wordpress or even a
> PHP page.  Simple HTML pages are getting blocked too.
>
>> If you tried to hit another WordPress page, it probably ALSO called
>> wp-cron.php which tried to hit the db to check for outstanding tasks,
>> and that call probably got blocked by a db record or table lock.
>>
>> I'm guessing this is really a question for the WordPress community.
>
> Maybe if it only blocked WP sites but it blocks all of them.
>


What mpm are you using? How many idle workers did you have then?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] One page hanging entire server

Posted by "D'Arcy J.M. Cain" <da...@Vex.Net>.
On Mon, 09 May 2016 16:26:19 -0400
C> What kind of response were you getting from your server when you
> connected with another client? Timeout? 503? 500?

That's the point, they time out even if it is not a Wordpress or even a
PHP page.  Simple HTML pages are getting blocked too.

> If you tried to hit another WordPress page, it probably ALSO called
> wp-cron.php which tried to hit the db to check for outstanding tasks,
> and that call probably got blocked by a db record or table lock.
> 
> I'm guessing this is really a question for the WordPress community.

Maybe if it only blocked WP sites but it blocks all of them.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] One page hanging entire server

Posted by "D'Arcy J.M. Cain" <da...@Vex.Net>.
On Tue, 10 May 2016 07:55:27 -0400
"D'Arcy J.M. Cain" <da...@Vex.Net> wrote:
> I say "if" because I am trying something and so far it seems to be
> working.  I realized that this was a recent problem and that I
> recently upgraded to 2.4.20.  I reverted to 2.4.18 last night and so
> far so good.  I will report after a few days or sooner if it happens
> again.

Even though I have defined DISABLE_WP_CRON wp-cron.php is still running
so I guess I have a Wordpress issue.  Just mentioning it here because I
promised I would and it doesn't appear to be a problem with Apache
2.4.20 as I was testing.

Thanks for all suggestions.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] One page hanging entire server

Posted by "D'Arcy J.M. Cain" <da...@Vex.Net>.
On Tue, 10 May 2016 10:03:53 +0100
James Smith <js...@sanger.ac.uk> wrote:
> Setting up apache server-status module is always a good idea - as you 
> can (try) and see the information about load/requests etc.

I have set it up but it doesn't help if Apache isn't serving pages.

> wp-cron.php is a wrapper script around a whole system of potentially 
> complex functions which maintain the database (garbage collect etc)
> it depends on what modules you have enabled how this is effecting the
> rest of the server.
> 
> If it is locking every word press script you may find that every
> apache child eventually handles a word press request (99 after the
> cron job locked wordpress) and so there are no free apache children
> to handle requests for static content...

That seems to be the problem.  And, you may have suggested a way to
check what's running.  When everything locks up I can't see the status
page and if I kill the problem process I can't see what it was but I
guess I can kill a couple of other sites and that may allow the status
page to run.  If it happens again I will try that.

I say "if" because I am trying something and so far it seems to be
working.  I realized that this was a recent problem and that I recently
upgraded to 2.4.20.  I reverted to 2.4.18 last night and so far so
good.  I will report after a few days or sooner if it happens again.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] One page hanging entire server

Posted by James Smith <js...@sanger.ac.uk>.
Setting up apache server-status module is always a good idea - as you 
can (try) and see the information about load/requests etc.

wp-cron.php is a wrapper script around a whole system of potentially 
complex functions which maintain the database (garbage collect etc) it 
depends on what modules you have enabled how this is effecting the rest 
of the server.

If it is locking every word press script you may find that every apache 
child eventually handles a word press request (99 after the cron job 
locked wordpress) and so there are no free apache children to handle 
requests for static content...

(e.g. with 5 children ... static requests return the child to allow it 
to accept another request - but when a wordpress request happens that 
locks that child out

: Request      : Children :
: /static.html : 1....    :
: /static.html : 1....    :
: /wp-cron.php : 1....    :
: /static.html : #2...    :
: /wp.php      : #2...    :
: /static.html : ##3..    :
: /static.html : ##3..    :
: /wp.php      : ##3..    :
: /static.html : ###4.    :
: /static.html : ###4.    :
: /wp.php      : ###4.    :
: /static.html : ####5    :
: /static.html : ####5    :
: /wp.php      : ####5    :
: /static.html : #####    :  <- hangs no free child

On 5/9/2016 9:26 PM, Christopher Schultz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> D'arcy,
>
> On 5/9/16 2:16 PM, D'Arcy J.M. Cain wrote:
>> This weekend at various times my server was brought down.  I saw
>> one process using over 99% of the CPU.  No pages could be served
>> while this was going on.  I found the culprit.  It was a Wordpress
>> site and the script was wp-cron.php.  I stopped it by adding a line
>> to wp-config.php as
>> http://geektnt.com/how-to-solve-wp-cron-php-high-cpu-usage.html
>> and other sites suggested.
>>
>> However, I am still confused how this one process was able to block
>> all other pages.  I have MaxClients set to 100 and 15 other cores
>> that they can be run on.  Why didn't my server continue to serve
>> requests?
> What kind of response were you getting from your server when you
> connected with another client? Timeout? 503? 500?
>
> If you tried to hit another WordPress page, it probably ALSO called
> wp-cron.php which tried to hit the db to check for outstanding tasks,
> and that call probably got blocked by a db record or table lock.
>
> I'm guessing this is really a question for the WordPress community.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlcw8msACgkQ9CaO5/Lv0PDhdwCfZQg66WfTk++WjLTsEBYMrnrD
> QVEAnipEMAPXxPhYRlz5/zYzJ8iueHYd
> =hyjH
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] One page hanging entire server

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

D'arcy,

On 5/9/16 2:16 PM, D'Arcy J.M. Cain wrote:
> This weekend at various times my server was brought down.  I saw
> one process using over 99% of the CPU.  No pages could be served
> while this was going on.  I found the culprit.  It was a Wordpress
> site and the script was wp-cron.php.  I stopped it by adding a line
> to wp-config.php as
> http://geektnt.com/how-to-solve-wp-cron-php-high-cpu-usage.html
> and other sites suggested.
> 
> However, I am still confused how this one process was able to block
> all other pages.  I have MaxClients set to 100 and 15 other cores
> that they can be run on.  Why didn't my server continue to serve
> requests?

What kind of response were you getting from your server when you
connected with another client? Timeout? 503? 500?

If you tried to hit another WordPress page, it probably ALSO called
wp-cron.php which tried to hit the db to check for outstanding tasks,
and that call probably got blocked by a db record or table lock.

I'm guessing this is really a question for the WordPress community.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlcw8msACgkQ9CaO5/Lv0PDhdwCfZQg66WfTk++WjLTsEBYMrnrD
QVEAnipEMAPXxPhYRlz5/zYzJ8iueHYd
=hyjH
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org