You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bob DeRemer <bo...@thingworx.com> on 2013/08/06 03:45:16 UTC

any known problems using Tomcat 7.0.42 apr/native (windows) with websockets?

QUESTION
Is anyone aware of any problems using the apr/native connector + websockets in Tomcat 7.0.42?

BACKGROUND
We are trying to see how many concurrent websocket connections Tomcat will handle running on Windows Server.   We wrote a multi-threaded java console app that spins up a thread-per simulated websocket client.  In each thread, we are using a separate Ning websocket client.  Unfortunately, we can't connect more than a few connections before we start getting websocket errors.

If we change the connector to use NIO, the sporadic connection errors seem to go away, but then we find that after about 200 connections, the communication seems to hang.  This happens if all connections are made from a single test client instance or spread across multiple client instances.

We're trying to determine where the problem lies and if it's in our use of Ning in a multi-threaded client app, Tomcat connector configuration, use of Tomcat websockets on Windows or something else.

If anyone has any suggestions, I would greatly appreciate it.  If you need additional information, please don't hesitate to ask.

Thanks,

Bob DeRemer
Senior Director, Architecture and Development

[Description: Description: Description: Description: cid:image001.png@01CBE3DE.51A12030]
http://www.thingworx.com<http://www.thingworx.com/>
Skype: bob.deremer.thingworx
O: 610.594.6200 x812
M: 717.881.3986


Re: any known problems using Tomcat 7.0.42 apr/native (windows) with websockets?

Posted by Niki Dokovski <ni...@gmail.com>.
On Tue, Aug 6, 2013 at 3:20 PM, Bob DeRemer <bo...@thingworx.com>wrote:

>
>
> > -----Original Message-----
> > From: Mark Thomas [mailto:markt@apache.org]
> > Sent: Tuesday, August 06, 2013 3:56 AM
> > To: Tomcat Users List
> > Subject: Re: any known problems using Tomcat 7.0.42 apr/native (windows)
> > with websockets?
> >
> > On 06/08/2013 03:45, Bob DeRemer wrote:
> > > QUESTION
> > >
> > > Is anyone aware of any problems using the apr/native connector +
> > > websockets in Tomcat 7.0.42?
> >
> > I'm not aware of any reports.
> >
> > > BACKGROUND
> > >
> > > We are trying to see how many concurrent websocket connections Tomcat
> > > will handle running on Windows Server.   We wrote a multi-threaded java
> > > console app that spins up a thread-per simulated websocket client.  In
> > > each thread, we are using a separate Ning websocket client.
> > > Unfortunately, we can't connect more than a few connections before we
> > > start getting websocket errors.
> >
> > What sort of errors?
>
> I believe the connection was being closed unexpectedly
>

> >
> > > If we change the connector to use NIO, the sporadic connection errors
> > > seem to go away, but then we find that after about 200 connections,
> > > the communication seems to hang.  This happens if all connections are
> > > made from a single test client instance or spread across multiple
> > > client instances.
> >
> > That suggests at least some issue with APR/native and WebSocket.
> >
> > > We're trying to determine where the problem lies and if it's in our
> > > use of Ning in a multi-threaded client app, Tomcat connector
> > > configuration, use of Tomcat websockets on Windows or something else.
> >
> > The focus in Tomcat 7 is going to move to the JSR356 implementation
> pretty
> > soon. I'd suggest looking at that rather than putting effort into Tomcat
> 7's
> > current implementation.
>
> Are there any examples for what must be written server-side?
> Also, is there a version of Tomcat (7 or 8) that has this functionality
> available to test against?
>
> >
> > > If anyone has any suggestions, I would greatly appreciate it.  If you
> > > need additional information, please don't hesitate to ask.
> >
> > I'll look into adding a concurrent client test to the Tomcat unit tests.
> >
>

Here https://nickytd@bitbucket.org/nickytd/websocket-echo-client.git is
what I used for some of the tests for Tomcat 8. It's more a stress than
load but still.

Nikolai Dokovski


> Mark
> >
>
> Bob
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: any known problems using Tomcat 7.0.42 apr/native (windows) with websockets?

Posted by Mark Thomas <ma...@apache.org>.
On 06/08/2013 14:20, Bob DeRemer wrote:
> 
> 
>> -----Original Message-----
>> From: Mark Thomas [mailto:markt@apache.org]
>> Sent: Tuesday, August 06, 2013 3:56 AM
>> To: Tomcat Users List
>> Subject: Re: any known problems using Tomcat 7.0.42 apr/native (windows)
>> with websockets?
>>
>> On 06/08/2013 03:45, Bob DeRemer wrote:
>>> QUESTION
>>>
>>> Is anyone aware of any problems using the apr/native connector +
>>> websockets in Tomcat 7.0.42?
>>
>> I'm not aware of any reports.
>>
>>> BACKGROUND
>>>
>>> We are trying to see how many concurrent websocket connections Tomcat
>>> will handle running on Windows Server.   We wrote a multi-threaded java
>>> console app that spins up a thread-per simulated websocket client.  In
>>> each thread, we are using a separate Ning websocket client.
>>> Unfortunately, we can't connect more than a few connections before we
>>> start getting websocket errors.
>>
>> What sort of errors?
> 
> I believe the connection was being closed unexpectedly
> 
>>
>>> If we change the connector to use NIO, the sporadic connection errors
>>> seem to go away, but then we find that after about 200 connections,
>>> the communication seems to hang.  This happens if all connections are
>>> made from a single test client instance or spread across multiple
>>> client instances.
>>
>> That suggests at least some issue with APR/native and WebSocket.
>>
>>> We're trying to determine where the problem lies and if it's in our
>>> use of Ning in a multi-threaded client app, Tomcat connector
>>> configuration, use of Tomcat websockets on Windows or something else.
>>
>> The focus in Tomcat 7 is going to move to the JSR356 implementation pretty
>> soon. I'd suggest looking at that rather than putting effort into Tomcat 7's
>> current implementation.
> 
> Are there any examples for what must be written server-side

The examples web application includes three samples. One just echoes
messages back, one is a chat application and one is a multi-player game
of snake (I just love that Tomcat now ships with a game by default -
kudos to Johno Crawford who wrote it).

http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/
and
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/

As an aside, I migrated the examples from the current Tomcat 7 WebSocket
implementation to the JSR-356 implementation. With an IDE to do most of
the renaming required, it didn't take long at all.

> Also, is there a version of Tomcat (7 or 8) that has this functionality available to test against?

8.0.0-RC1 is available to download. The formal release announcement will
be going out just as soon as I finish going through all the e-mail in my
inbox.

Mark

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


RE: any known problems using Tomcat 7.0.42 apr/native (windows) with websockets?

Posted by Bob DeRemer <bo...@thingworx.com>.

> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Tuesday, August 06, 2013 3:56 AM
> To: Tomcat Users List
> Subject: Re: any known problems using Tomcat 7.0.42 apr/native (windows)
> with websockets?
> 
> On 06/08/2013 03:45, Bob DeRemer wrote:
> > QUESTION
> >
> > Is anyone aware of any problems using the apr/native connector +
> > websockets in Tomcat 7.0.42?
> 
> I'm not aware of any reports.
> 
> > BACKGROUND
> >
> > We are trying to see how many concurrent websocket connections Tomcat
> > will handle running on Windows Server.   We wrote a multi-threaded java
> > console app that spins up a thread-per simulated websocket client.  In
> > each thread, we are using a separate Ning websocket client.
> > Unfortunately, we can't connect more than a few connections before we
> > start getting websocket errors.
> 
> What sort of errors?

I believe the connection was being closed unexpectedly

> 
> > If we change the connector to use NIO, the sporadic connection errors
> > seem to go away, but then we find that after about 200 connections,
> > the communication seems to hang.  This happens if all connections are
> > made from a single test client instance or spread across multiple
> > client instances.
> 
> That suggests at least some issue with APR/native and WebSocket.
> 
> > We're trying to determine where the problem lies and if it's in our
> > use of Ning in a multi-threaded client app, Tomcat connector
> > configuration, use of Tomcat websockets on Windows or something else.
> 
> The focus in Tomcat 7 is going to move to the JSR356 implementation pretty
> soon. I'd suggest looking at that rather than putting effort into Tomcat 7's
> current implementation.

Are there any examples for what must be written server-side?
Also, is there a version of Tomcat (7 or 8) that has this functionality available to test against?

> 
> > If anyone has any suggestions, I would greatly appreciate it.  If you
> > need additional information, please don't hesitate to ask.
> 
> I'll look into adding a concurrent client test to the Tomcat unit tests.
> 
> Mark
> 

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


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


Re: any known problems using Tomcat 7.0.42 apr/native (windows) with websockets?

Posted by Mark Thomas <ma...@apache.org>.
On 06/08/2013 03:45, Bob DeRemer wrote:
> QUESTION
> 
> Is anyone aware of any problems using the apr/native connector +
> websockets in Tomcat 7.0.42?

I'm not aware of any reports.

> BACKGROUND
> 
> We are trying to see how many concurrent websocket connections Tomcat
> will handle running on Windows Server.   We wrote a multi-threaded java
> console app that spins up a thread-per simulated websocket client.  In
> each thread, we are using a separate Ning websocket client. 
> Unfortunately, we can’t connect more than a few connections before we
> start getting websocket errors.

What sort of errors?

> If we change the connector to use NIO, the sporadic connection errors
> seem to go away, but then we find that after about 200 connections, the
> communication seems to hang.  This happens if all connections are made
> from a single test client instance or spread across multiple client
> instances.

That suggests at least some issue with APR/native and WebSocket.

> We’re trying to determine where the problem lies and if it’s in our use
> of Ning in a multi-threaded client app, Tomcat connector configuration,
> use of Tomcat websockets on Windows or something else.

The focus in Tomcat 7 is going to move to the JSR356 implementation
pretty soon. I'd suggest looking at that rather than putting effort into
Tomcat 7's current implementation.

> If anyone has any suggestions, I would greatly appreciate it.  If you
> need additional information, please don’t hesitate to ask.

I'll look into adding a concurrent client test to the Tomcat unit tests.

Mark


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