Re: [PHP-DEV] Fwd: [PHP] php with threaded MPM problem ?

2007-12-19 Thread Brian Moon

Rashmi Badan wrote:

The test was trying to load mod_php between graceful restarts, i.e start
apache without mod_php, then modify the config file to load it and do a
graceful restart. This clearly fails because mod_php loads only on the
second load within apache. It does this by setting some pool user data in
the beginning of sapi_apache2.c:php_apache_server_startup(). So I'd have to
do two graceful restarts for it to take effect.


PHP has never worked well with graceful restarts.  Frankly, there are 
some Apache things that never seemed to do well either.  I gave up on 
graceful restarts 8 years ago.  Maybe they are better now.


Just do a full restart and all will be fine.  If this is so mission 
critical that you can't be down for 2 seconds, you need more servers and 
load balancing.  Or if you are restarting your server that often, 
something else is likely wrong.


As for changing the code, a patch that does not break anything would be 
the way to approach the list.  It was probably done the way it is done 
for a reason.


--

Brian Moon
Senior Developer
--
When you care enough to spend the very least.
http://dealnews.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Fwd: [PHP] php with threaded MPM problem ?

2007-12-19 Thread Jochem Maas
Brian Moon schreef:
 Rashmi Badan wrote:
 The test was trying to load mod_php between graceful restarts, i.e start
 apache without mod_php, then modify the config file to load it and do a
 graceful restart. This clearly fails because mod_php loads only on the
 second load within apache. It does this by setting some pool user data in
 the beginning of sapi_apache2.c:php_apache_server_startup(). So I'd
 have to
 do two graceful restarts for it to take effect.
 
 PHP has never worked well with graceful restarts.  Frankly, there are
 some Apache things that never seemed to do well either.  I gave up on
 graceful restarts 8 years ago.  Maybe they are better now.

could anyone else confirm/deny that this is [still] the case?
(i.e. avoid graceful restarts when using php)

 
 Just do a full restart and all will be fine.  If this is so mission
 critical that you can't be down for 2 seconds, you need more servers and
 load balancing.  Or if you are restarting your server that often,
 something else is likely wrong.
 
 As for changing the code, a patch that does not break anything would be
 the way to approach the list.  It was probably done the way it is done
 for a reason.
 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Fwd: [PHP] php with threaded MPM problem ?

2007-12-19 Thread jvlad
I use graceful restart quite often.
Frankly, I have no idea why it may fail to work :)
Indeed, when you request a graceful restart, apache will start next set of 
children processes and all existing processes will stop getting and 
processing any new requests so they will exit as soon as they finish current 
ones.
It's a very neat feature, especially if you care of your visitors and for 
example don't want to break their long downloads.

Finally it works fine for me (apache 2.0 + php 4.3)
If you get any problems I'd recommend to check extended status (see Apache 
manual on what it is) and enable debug level for the logs.
In case of crashes in php, please follow appropriate instructions and submit 
report at bugs.php.net



Jochem Maas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Brian Moon schreef:
 Rashmi Badan wrote:
 The test was trying to load mod_php between graceful restarts, i.e start
 apache without mod_php, then modify the config file to load it and do a
 graceful restart. This clearly fails because mod_php loads only on the
 second load within apache. It does this by setting some pool user data 
 in
 the beginning of sapi_apache2.c:php_apache_server_startup(). So I'd
 have to
 do two graceful restarts for it to take effect.

 PHP has never worked well with graceful restarts.  Frankly, there are
 some Apache things that never seemed to do well either.  I gave up on
 graceful restarts 8 years ago.  Maybe they are better now.

 could anyone else confirm/deny that this is [still] the case?
 (i.e. avoid graceful restarts when using php)


 Just do a full restart and all will be fine.  If this is so mission
 critical that you can't be down for 2 seconds, you need more servers and
 load balancing.  Or if you are restarting your server that often,
 something else is likely wrong.

 As for changing the code, a patch that does not break anything would be
 the way to approach the list.  It was probably done the way it is done
 for a reason.
 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Fwd: [PHP] php with threaded MPM problem ?

2007-12-19 Thread Rashmi Badan
Graceful restarts work absolutely fine for me as well - only when I had php
enabled in the first place. What does work is this

- Start apache without mod_php
- change your httpd.conf to load mod_php
- now do a graceful restart

Apache will start fine without pa problem. Now send a request - anything
that might invoke the php_handler, maybe just setting up a connection should
do it. You will see a failure/crash.

Ofcourse you would have to configure your mod_php with the TSRM and ZTS
thingie. If you still don't see a crash then I'd be curious because
according to the code it should :)

Rgds,
Rashmi


On Dec 20, 2007 5:09 AM, jvlad [EMAIL PROTECTED] wrote:

 I use graceful restart quite often.
 Frankly, I have no idea why it may fail to work :)
 Indeed, when you request a graceful restart, apache will start next set of
 children processes and all existing processes will stop getting and
 processing any new requests so they will exit as soon as they finish
 current
 ones.
 It's a very neat feature, especially if you care of your visitors and for
 example don't want to break their long downloads.

 Finally it works fine for me (apache 2.0 + php 4.3)
 If you get any problems I'd recommend to check extended status (see Apache
 manual on what it is) and enable debug level for the logs.
 In case of crashes in php, please follow appropriate instructions and
 submit
 report at bugs.php.net



 Jochem Maas [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Brian Moon schreef:
  Rashmi Badan wrote:
  The test was trying to load mod_php between graceful restarts, i.estart
  apache without mod_php, then modify the config file to load it and do
 a
  graceful restart. This clearly fails because mod_php loads only on the
  second load within apache. It does this by setting some pool user data
  in
  the beginning of sapi_apache2.c:php_apache_server_startup(). So I'd
  have to
  do two graceful restarts for it to take effect.
 
  PHP has never worked well with graceful restarts.  Frankly, there are
  some Apache things that never seemed to do well either.  I gave up on
  graceful restarts 8 years ago.  Maybe they are better now.
 
  could anyone else confirm/deny that this is [still] the case?
  (i.e. avoid graceful restarts when using php)
 
 
  Just do a full restart and all will be fine.  If this is so mission
  critical that you can't be down for 2 seconds, you need more servers
 and
  load balancing.  Or if you are restarting your server that often,
  something else is likely wrong.
 
  As for changing the code, a patch that does not break anything would be
  the way to approach the list.  It was probably done the way it is done
  for a reason.
 

 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php