On Wednesday 01 August 2001 04:10 am, Andrew Jarman wrote:
> Sorry, I should have been more clear.
>
> I am not having problem with my *session* timing out, I am having problems
> with the actual connection timing out.
>
> Here's the scenario:
>
> 1.  Client does a POST, sending in an XML document (using the MSXML3 DOM on
> a MS client).
> 2.  Server parses the XML, writes some data to a database, then calls an
> Oracle Report server to generate a PDF file based on the information.
> 3.  The thread waits for the report to be completed, then it retrieves the
> PDF file and stores it on a NFS volume.
> 4.  The servlet thread then returns an XML response that contains a
> reference to where the PDF file can be picked up.
> 5.  The client then retrieves the file using a HTTP GET method, going
> through the normal Apache server, which can access the NFS volume.
>
> This architecture works fairly well, and most reports return fairly quickly
> (30 - 120 sec).  Also, having the client retrieve the report using an HTTP
> GET gets around a bunch of issues with the Acrobat reader and IE5 (did you
> know that IE+Acrobat+SSL != good_experience?)
>
> The problem is that a long running report can make step (3) wait for more
> than 5 minutes, at which time TomCat gives up and closes the connection
> with an error.  This means that any report that takes longer than 5 min
> will not work.

Seems like the excact same proble I had.

> I fully understand the deficiencies of this design, and while I don't like
> it, it was possible to implement very quickly and in time for our next
> production release.  We will further address the problem in a future build
> when we have a few other infrastructure pieces in place, like an "inbox"
> queue so users can see when reports have completed.
>
> So, my question remains - how can I increase this timeout from 5 min to
> something longer?
I did it by doing the following,
in my doGet/Post method, response is the HttpServletResponse object
response.addHeader("Connection:","Keep-Alive");//not quite sure if I had the
colon after "Connection"

afaik this is a HTTP 1.1 feature, and Tomcat 3.x supports only 1.0
Well anyway it works fine with IExplorer 5.x clients, it happily waits an 
hour or two now.(havent tested any other browsers...)

It didnt work with using Apache as a http proxy betwen IExplorer clients and 
the tomcat server though.
 
-- 
Nils O. Sel�sdal

Reply via email to