Re: timeout after long waiting

"Jerry W. Walker" <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hi, Cheong,

The timeout is set in the browser and typically runs around 20 or 30  
seconds. At that point the browser closes its end of the socket  
causing the server to throw this exception when your app attempts to  
write into the other end of the socket.

Since you can only set the default timeout for a tiny fraction of the  
browsers that might hit your site, you're left with a couple  
realistic options:

   * considerably shorten the processing time of the action invoked.  
As nonsensical as this might sound, if the process is taking so long  
because it's trying to display all the records it finds for some  
criteria and that number of records is in the 1000's or more, you  
might limit the records to the first 100 or so, since almost no one  
really wants a few thousand records displayed. If you consider this  
option seriously, you might find other ways to break up the  
processing into responses to multiple requests, thereby shortening  
the processing time.

   * if that fails, use the WOLongResponsePage. Not only will the  
WOLongResponsePage continually refresh the browser page (at a refresh  
time interval that you can choose) while your long running process is  
running in the background, but you can even use it to provide a  
(course grained) progress indicator on the status of your long  
running process.

Either approach can markedly improve the perceived response time of  
your application, particularly if you run the processing for the  
action in a lower priority thread for the latter option, since such a  
long running action will otherwise block responses to other requests  
that come in while it's running causing other users to wait for their  
pages. This can become troublesome for the follow-on users if their  
browser pages time out as well for simple requests.

Regards,
Jerry

On Feb 8, 2006, at 5:11 AM, Cheong Hee (DCQSS) wrote:

> Could someone assis to solve this?
>
> [2006-02-08 18:01:30 SGT] <WorkerThread5> <WOWorkerThread id=5  
> socket=Socket[addr=/192.168.0.24,port=2213,localport=55558]>  
> Exception while sending response: java.net.SocketException:  
> Software caused connection abort: socket write error
>
> It happens when I have invoked an action in WOComponent, and the  
> action takes a bit longer time to process (still less than 2  
> minutes).  Before the process is ended, the browser had already  
> gone into error page.  The session timeout is much longer than the  
> processing time.
>
> Appreciate any input.  Thanks.
>
> Regards
>
> Cheong Hee
>
>
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev


--
__ Jerry W. Walker,
    WebObjects Developer/Instructor for High Performance Industrial  
Strength Internet Enabled Systems

     [email protected]
     203 278-4085        office
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.