perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: mod_perl and Apache::DBI - what happens on request termination
Date Mon, 04 Jun 2012 19:43:30 GMT
Erik Scholtz wrote:
> Hi,
> 
> I have a small question about the Apache::DBI behaviour:
> 
> If a http-connection drops (for any reason), while a huge amount of data 
> is loaded from the database to the webserver, will Apache::DBI cancel 
> the loading (means cancel the query) or will it continue loading the 
> data till the end (means finish the execution of the query / not in a 
> transaction) and then become ready for a new request again?
> 
> 
Maybe a beginning of an answer :

Generally speaking, a response handler responding to a client HTTP request, will not even

know that the client<->httpd connection has been dropped, before it tries to send 
something back to the client.  Then it will get a "write to client socket error".  But 
before that, it will not know.

So, if the response handler (which runs your script/program which runs the DBI code) is 
busy doing something with the database server, but not writing anything back to the 
client, it will happily continue doing that for as long as it takes.

When it is done talking to the database server, and starts sending the data to the client,

then it will get the error and probably crash, unless it is prepared for such errors and 
returns nicely.

Mime
View raw message