Re: Catching graceful restart in apache2 module

2009-08-04 Thread Petr Hracek
That's true. I have some changes and this function returns always. In my post_config handler function I have following code: if(!ap_graceful_stop_signalled()) { ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, base_server, "!!! Graceful has not been called therefor kill all

Re: Catching graceful restart in apache2 module

2009-08-04 Thread Graham Dumpleton
2009/8/4 Graham Dumpleton : > 2009/8/4 Ruediger Pluem : >> >> >> On 08/04/2009 09:02 AM, Graham Dumpleton wrote: >>> 2009/8/4 Petr Hracek : I have found in following link: (http://wiki.apache.org/httpd/ModuleLife) Race conditions during graceful restart During a graceful re

Re: Catching graceful restart in apache2 module

2009-08-04 Thread Graham Dumpleton
2009/8/4 Ruediger Pluem : > > > On 08/04/2009 09:02 AM, Graham Dumpleton wrote: >> 2009/8/4 Petr Hracek : >>> I have found in following link: (http://wiki.apache.org/httpd/ModuleLife) >>> >>> Race conditions during graceful restart >>> >>> During a graceful restart, old children are still serving o

Re: Catching graceful restart in apache2 module

2009-08-04 Thread Ruediger Pluem
On 08/04/2009 09:02 AM, Graham Dumpleton wrote: > 2009/8/4 Petr Hracek : >> I have found in following link: (http://wiki.apache.org/httpd/ModuleLife) >> >> Race conditions during graceful restart >> >> During a graceful restart, old children are still serving old requests while >> new children ar

Re: Catching graceful restart in apache2 module

2009-08-04 Thread Graham Dumpleton
2009/8/4 Petr Hracek : > I have found in following link: (http://wiki.apache.org/httpd/ModuleLife) > > Race conditions during graceful restart > > During a graceful restart, old children are still serving old requests while > new children are serving new requests. If the same lock must be used by o

Re: Catching graceful restart in apache2 module

2009-08-03 Thread Petr Hracek
I have found in following link: (http://wiki.apache.org/httpd/ModuleLife) Race conditions during graceful restart During a graceful restart, old children are still serving old requests while new children are serving new requests. If the same lock must be used by old and new children, then the lock

Re: Catching graceful restart in apache2 module

2009-08-01 Thread Petr Hracek
As you mentioned: >The request pool is no good, because that's cleaned up at the end of the >request. The connection pool is also no good, because that gets cleaned >up after the connection dies. You're probably after the pool you're >given during the post_config hook, which gets destroyed on serve

Re: Catching graceful restart in apache2 module

2009-07-31 Thread Graham Leggett
Petr Hracek wrote: > Thank for the answer. > > Could you please explain in details how to do "register save-sessions as > a pool cleanup". You call a function that looks like this to register your cleanup: apr_pool_cleanup_register(pool, (void *) foo, foo_cleanup, foo_cleanu

Re: Catching graceful restart in apache2 module

2009-07-30 Thread Petr Hracek
Thank for the answer. Could you please explain in details how to do "register save-sessions as a pool cleanup". Some example whould be enought. Where to do that (in which hook)? During the initialization of the my module I am calling the function for killing all sessions but If I will know how to

Re: Catching graceful restart in apache2 module

2009-07-30 Thread Nick Kew
Petr Hracek wrote: Is there any way how to detect that gracefull restart has been started and where should I place the code for detection in our module. I can't think of anything OTTOMH. Normal practice would be for the client to hold a session token, which the server can use as a database k