tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob DeRemer <bob.dere...@thingworx.com>
Subject RE: websocket connection (at startup) between 2 webapps in same Tomcat 7.0.47 instance hangs indefinitely
Date Tue, 22 Oct 2013 19:41:53 GMT


> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Tuesday, October 22, 2013 3:34 PM
> To: Tomcat Developers List
> Subject: Re: websocket connection (at startup) between 2 webapps in same
> Tomcat 7.0.47 instance hangs indefinitely
> 
> On 22/10/2013 16:17, Mark Thomas wrote:
> > On 18/10/2013 22:09, Bob DeRemer wrote:
> >> Hi Guys,
> >>
> >>
> >>
> >> In our implementation, we have a gateway app that uses jsr websockets
> >> to communication with our main application server.  In a small
> >> system, we want to run them both on a single Tomcat instance using
> >> the same Tomcat NIO connector, but directing to different respective
> >> WS paths.  This works fine if you deploy the MAIN first, then the GW
> >> - so that MAIN is already up and running.  If you restart Tomcat when
> >> both webapps are deployed - and the GW (client) starts first, it
> >> hangs indefinitely in the following code trying to establish a WS connection:
> >>
> >>
> >>
> >> Is this a bug or a known limitation when a client/server in the same
> >> webapp try to connect at startup?
> >
> > It certainly shouldn't hang indefinitely - I'll take a look.
> 
> I have fixed the indefinite hang. There is now a user configurable IO timeout
> the defaults to 5 seconds.
> 
> If you enable parallel starting of containers (set startStopThreads on the host to
> more than 1) you might be able to work around this but I haven't tested it.
> 
> To avoid random timing issues, you'll still need to handle the failure and retry
> after a short wait.
> 

Outta curiosity, what was going on?  Also, will this be in 7.0.48?
Thx for such a quick turnaround - bob

> Mark
> 
> >
> > However, there is no guarantee made about application start order so
> > your code will need to handle failures and re-try after a suitable wait.
> >
> > Mark
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For
> > additional commands, e-mail: dev-help@tomcat.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional
> commands, e-mail: dev-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message