[Xitami] RE: Stopping and restarting (or resetting) Xitamiwithperl
R O
rolinger1 at hotmail.com
Wed Jan 4 19:47:58 CET 2006
This all seems a bit too complicated for a simple process.
The problem with killing and restarting the service via cgi (and I think
php) is that when you kill the server you will also kill the process that is
executing the kill/restart commands. The kill command will work and will
stop the service, but now that the service is stopped the cgi will be
terminated which means the second part of the the perl process, "restart",
won't get executed simply because the CGI process has already been
terminated.
I know this is a fact for the CGI process but I am not certain about the
PHP. CGI is a engine that runs and execute web based perl scripts. However
I think the beauty of PHP is that there is no engine managing php scripts,
which means if a php script is run via a url, that the php script will load
into memory and execute even if the webserver is killed in the middle of
being executed. Someone might be able to elaborate on the PHP process but I
think thats how PHP works.
Someone else suggested use the "server refresh" feature in the defaults.cfg
but this means its an automated thing and doesn't give you the ability to do
it remotely, quickly, etc. when ever you want. You need another way of
executing a perl/php script remotely that isn't done via the URL, or via the
same webserver. Maybe run a second web service on a different port that
simply manages the kill/restart of the first service.
Russel P. Olinger
(310) 466-3399
rolinger1 at hotmail.com
>From: Martin Bleisteiner <mail at bleisteiner.net>
>Reply-To: Xitami Users General Discussion <xitami at lists.xitami.org>
>To: Xitami Users General Discussion <xitami at lists.xitami.org>
>Subject: RE: [Xitami] RE: Stopping and restarting (or resetting)
>Xitamiwithperl
>Date: Wed, 4 Jan 2006 19:33:02 +0100
>
>Hello,
>
>There are lots of different "kill" tools out there. Most of them can be set
>to different "brutality" levels. First they try to stop the running task by
>sending a kind of "Alt-F4" command. When the task is still running properly
>it will react by closing all open files and terminate the regular way.
>After this, when no reaction, the running .exe can be really "killed" and
>can be kicked out of memory.
>
>I'm running a scheduled task that is testing the Xitami server every minute
>by a simple http-Get, and if there is no answer probably Xitami was shot by
>unknown reason (maybe my own PHP scripts do so by fault). This happens 2-3
>times a day to me. After a defect is recognized, Xitami becomes killed and
>restarted in the way I mentioned. I never found problems when doing so. No
>problems with open files, even when PHP scrips are called.
>
>Martin
>
>----- Original Message ---------------
>
> >Yes but is it safe to kill Xitami just like that whenever you feel like
> >it? Runing CGIs, open files and all..
> >
> >Ayhan
> >
> >try to download Windows Command line Tool "kill.exe"
> >Then try to put two Shell Commands by PHP:
> >
> >shell("kill xiwin32.exe");
> >shell("xiwin32.exe");
> >
> >- or something like this.
> >
> >First line kills all active tasks of Xitami, the second line starts new
> >Xitami.
> >Refer to the manual of the kill.exe tool.
> >
> >Martin
> >
>
>
>--
>Xitami Users Mailing List -- For Xitami support
>To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
More information about the Xitami
mailing list