On 2004-11-22 11:13:29 -0800, Henri Asseily wrote:
> On Nov 22, 2004, at 5:30 AM, Bob Showalter wrote:
> >Kevin Bass wrote:
> >>I have a slight problem that I am attemping to solve. I am using
> >>CGI/Perl (DBD Oracle) on Linux AS 2.1 to access to the database. When
> >>users encounter problems on the web, they cancel (or press stop) in
> >>their browsers. This will stop there browser interaction and also
> >>cause the database connection to not disconnect which causes a
> >>runaway process.
[...]
> http://perl.apache.org/docs/1.0/guide/ 
> debug.html#Handling_the__User_pressed_Stop_button__case

Of course this technique assumes that 

1) you can send something periodically, so if you are doing potentially
long-running DBI queries, you would have to run them in a separate
thread or process.

2) the extra characters won't confuse the client. An HTML page won't
look different if you insert a few superfluous blanks (I'm less sure
about null characters) if you are a bit careful about where you insert
them.  If you generate for example, a PDF file or an image you generally
can't insert extra bytes.

        hp

-- 
   _  | Peter J. Holzer      | If the code is old but the problem is new
|_|_) | Sysadmin WSR / LUGA  | then the code probably isn't the problem.
| |   | [EMAIL PROTECTED]        |
__/   | http://www.hjp.at/   |     -- Tim Bunce on dbi-users, 2004-11-05

Attachment: pgpo0wYPK7PVb.pgp
Description: PGP signature

Reply via email to