RPC Timeout because of delay at server side

201 views
Skip to first unread message

Rock

unread,
Jul 14, 2011, 8:32:05 AM7/14/11
to Google Web Toolkit
Hi Guys,
I have a GWT application which I used for Installation of multiple
servers using PERL scripts. These installation scripts can take as
long as 2-3 hours to execute, because of this the client requests
times out, after around 1 hour, with the following response in the
onFailure() method:

com.google.gwt.user.client.rpc.StatusCodeException: <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/
html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-
family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY><H1>ERROR</H1><H2>The requested URL could not be
retrieved</H2>
<HR noshade size="1px"><P>While trying to retrieve the URL:
<A HREF="[no URL]">[no URL]</A><P>The following error was
encountered:<UL><LI>
<STRONG>Read Timeout</STRONG></UL><P>The system returned:
<PRE><I> [No Error]</I></PRE><P>
A Timeout occurred while waiting to read data from the network. The
network
or server may be down or congested. Please retry your request.
<P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</
A>.
<BR clear="all"><HR noshade size="1px"><ADDRESS>
Generated Tue, 12 Jul 2011 07:12:18 GMT by tklcnis (squid/
2.5.STABLE9)</ADDRESS>
</BODY></HTML>

Although the code at my server end keeps on running even after the
timeouts and the installations are completed successfully, but when I
return the data from server function saying "installation completed",
the request is already outdated/stale and nothing happens as it has
already declared request as failed.

How can I increase the RPC timeout to infinite, so that it never
timesout.

Using Tomcat 6.0 and GWT: 1.7

Please Help

Jeff Chimene

unread,
Jul 14, 2011, 12:57:15 PM7/14/11
to google-we...@googlegroups.com
On 07/14/2011 05:32 AM, Rock wrote:
> Hi Guys,
> I have a GWT application which I used for Installation of multiple
> servers using PERL scripts. These installation scripts can take as
> long as 2-3 hours to execute, because of this the client requests
> times out, after around 1 hour, with the following response in the
> onFailure() method:
Your scripts need to communicate with the client on a regular basis.
Look at the gwtupload project for some ideas on this topic.

Jens

unread,
Jul 14, 2011, 1:07:45 PM7/14/11
to google-we...@googlegroups.com
Maybe when you start your long running job your server should just notify the client that it has received the job request and that it gets started. Once that is done the client could ask the server periodically (using a GWT Timer) if the job is done or if something went wrong during job execution.

-- J.

Aidan O'Kelly

unread,
Jul 14, 2011, 5:12:23 PM7/14/11
to google-we...@googlegroups.com
> How can I increase the RPC timeout to infinite, so that it never
> timesout.
>

FYI, 'Read Timeout' is being caused by the OS's TCP stack, so you
cannot/should not hope to increase this time-out from GWT client code,
you must use one of the methods suggested. (keep-alive's or polling
the server to check for completion )

Alfredo Quiroga-Villamil

unread,
Jul 14, 2011, 5:23:11 PM7/14/11
to google-we...@googlegroups.com
Hello Aidan:

I wouldn't personally suggest increasing the timeout value. Instead you can do one or two things:

1. Poll the server every X amount of time and create a mechanism in the backend server to let you know when the process/es completed.
2. Implement Server Push (Take a look at Jetty Continuations).

Regards,

Alfredo


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton


Reply all
Reply to author
Forward
0 new messages