[PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Donald Tyler
Hi,

 

 

We are building an Intranet for our company and I was wondering how
people deal with having to restart the server when its running an
intranet. Obviously if there is a complex process running and the server
restarts in the middle of it then its going to screw a lot of stuff up.

 

The only thing I could think of was to script the Intranet in such a way
as I could go into the admin section and simply disable it, then all the
currently running processes would finish, but the system would refuse to
start any new ones until I re-enabled it again.

 

Just want some advice, thanks.

 

 

Donald



Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Marek Kilimajer
# apachectl graceful

snip from manpage:

   gracefulGracefully restarts the Apache daemon by send­
   ing it a SIGUSR1.  If the daemon is  not  run­
   ning, it is started.  This differs from a nor­
   mal restart in that currently open connections
   are  not  aborted.   A side effect is that old
   log files  will  not  be  closed  immediately.
   This  means  that  if  used  in a log rotation
   script, a substantial delay may  be  necessary
   to  ensure  that  the old log files are closed
   before processing them.  This command automat­
   ically checks the configuration files via con­
   figtest before initiating the restart to  make
   sure Apache doesn't die.
Donald Tyler wrote:

Hi,

 

 

We are building an Intranet for our company and I was wondering how
people deal with having to restart the server when its running an
intranet. Obviously if there is a complex process running and the server
restarts in the middle of it then its going to screw a lot of stuff up.
 

The only thing I could think of was to script the Intranet in such a way
as I could go into the admin section and simply disable it, then all the
currently running processes would finish, but the system would refuse to
start any new ones until I re-enabled it again.
 

Just want some advice, thanks.

 

 

Donald


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]):
 # apachectl graceful

Its also wise to run a 'configtest' 

# apachectl configtest

It is a bummer if apache doesn't restart cause there is something
wrong with the config.


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Marek Kilimajer
This command automatically checks the configuration files via configtest 
before initiating the restart to make sure Apache doesn't die.

So it is not necessery.

Curt Zirzow wrote:

* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]):

# apachectl graceful


Its also wise to run a 'configtest' 

# apachectl configtest

It is a bummer if apache doesn't restart cause there is something
wrong with the config.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Scott Fletcher
Wow!  I didn't know that.  I have been using apachectl restart all the time.
Now I feel better that this feature will allow Apache to be running until
people logged off of the website (by the mean of terminating the apache
connection)

Thanks!!!

Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
# apachectl graceful

snip from manpage:

gracefulGracefully restarts the Apache daemon by send­
ing it a SIGUSR1.  If the daemon is  not  run­
ning, it is started.  This differs from a nor­
mal restart in that currently open connections
are  not  aborted.   A side effect is that old
log files  will  not  be  closed  immediately.
This  means  that  if  used  in a log rotation
script, a substantial delay may  be  necessary
to  ensure  that  the old log files are closed
before processing them.  This command automat­
ically checks the configuration files via con­
figtest before initiating the restart to  make
sure Apache doesn't die.

Donald Tyler wrote:

 Hi,





 We are building an Intranet for our company and I was wondering how
 people deal with having to restart the server when its running an
 intranet. Obviously if there is a complex process running and the server
 restarts in the middle of it then its going to screw a lot of stuff up.



 The only thing I could think of was to script the Intranet in such a way
 as I could go into the admin section and simply disable it, then all the
 currently running processes would finish, but the system would refuse to
 start any new ones until I re-enabled it again.



 Just want some advice, thanks.





 Donald



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php