Re: Socket level time-out configuration in the Apache HTTP server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
It's a common problem with long time process.
But if the user close its browser and application runs, this one has no interaction with network. We have the following scenario:
. connection : handshake with SYN, SYN-ACK - ACK packets between browser and apache
. HTTP request received from the browser which wait its response
. process execution : the PHP process runs and browser already waits.
. the browser is closed. Nothing append in the server side because no network interaction exists at this moment until application stops (failed or ok). When application terminates, the response is send and server will receive a TCP RST packet (reset) cause connection no longer exists.

So you should use a interaction during the process to inform the user he must wait (icon, message) and refresh it during process. If a refresh failed (browser no longer connected) so terminates application.
You can use sample at http://www.valhalla.fr/2007/08/01/php-wait-screen/

Bye
Le 06/02/2014 12:01, Todd MacKay a écrit :
Is there socket level time-out configuration in the Apache HTTP server?  If yes, which module(s) should be included and how should they be configured?

Background: Using the Apache 2.2.24 HTTP server,  we are running a PHP process that performs long-running operations to send output results to client's browser.  Sometimes the user becomes impatient and closes the browser before the PHP process has finished.   They then re-open the browser which starts a new PHP process while the original process is still running.

Our goal is that as soon as the connection to the browser is closed, the PHP process should be killed/terminated instead of continuing to process an occupying valuable resources.

We have tried using the ob_flush() function in PHP to trigger Apache to terminate the process but would prefer to do this with Apache.

It appears this functionality exists in the Apache Tomcat software (See: http://tomcat.apache.org/connectors-doc/generic_howto/timeours.html) so we'd like to know if similar functionality can be configured in the Apache HTTP server.

Thanks,




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux