Re: Does apache stop a script mid execution ?



arkascha wrote:
Guillermo Antonio Amaral Bastidas wrote:

Hi everybody,

I have a quick and probably dumb question, keep in mind I just
dumped my old love FastCGI + Perl for it's younger hotter friend PHP5.

If the user calls a time consuming script and then stops or refreshes
the browser before the script had time to finish will Apache kill the
script mid execution or will it let it finish ?

I ask this stupid question because this seems to be happening in one
of my sites.

If this is true, is there any way to tell apache to finish what it
was doing ?

Yes, it DOES stop the execution. That is usually the desired behaviour, since you dont want to spend all the
valuable cpu ressource to produce a result noone is ever going to see
anyway because the client has gone away. However you can change this behaviour: take a look at the ignore_user_abort
function


that is interesting and worth knowing.

How does it relate to e.g. a script performing a large mysql query?



arkascha
.



Relevant Pages

  • Re: Does apache stop a script mid execution ?
    ... I have a quick and probably dumb question, ... If the user calls a time consuming script and then stops or refreshes ... it DOES stop the execution. ... That is usually the desired behaviour, since you dont want to spend all the ...
    (comp.lang.php)
  • Re: Does apache stop a script mid execution ?
    ... If the user calls a time consuming script and then stops or refreshes ... it DOES stop the execution. ... That is usually the desired behaviour, since you dont want to spend all the ...
    (comp.lang.php)
  • Re: MATLAB Code for a stop process button which ex
    ... especially in the while loop(for each script command starting in the ... % varargin command line arguments to stop_button ... % line_num is the order of execution. ... msgno = msgno+1; ...
    (comp.soft-sys.matlab)
  • Re: CGI Scripts
    ... the URL to have "Scripts and Executables" execution permission, ... script by their respective script engines, and all URLs that are .COM, .EXE, ... If you make a request to the CGI script and you get the download dialog, ...
    (microsoft.public.inetserver.iis.security)
  • Re: [opensuse] perl under apache2 downloads scripts instead of executiing
    ... 3.I had intially softlinked ledgersmb to /srv/www/htdocs but removed the ... You need to add an apache directive to allow script execution in the ... bad idea to allow script execution in the htdocs document tree. ...
    (SuSE)