tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: 8.0.x / 7.0.x progress
Date Mon, 07 Oct 2013 12:49:48 GMT
On 07/10/2013 13:22, Konstantin Preißer wrote:
> Hi Mark,
> 
>> -----Original Message----- From: Mark Thomas
>> [mailto:markt@apache.org] Sent: Sunday, October 6, 2013 5:42 PM To:
>> Tomcat Developers List Subject: Re: 8.0.x / 7.0.x progress
>> 
>> On 06/10/2013 02:57, Konstantin Preißer wrote:
>> 
>>> These errors seem to be introduced with r1529537 [2], as I get
>>> these errors
>> with that revision, but with the previous one (r1529536) it works
>> fine.
>> 
>> That patch is causing other problems too. Time to revert and
>> re-think.
> 
> Thanks, after r1529697 the problems do not occur any more.

Good.

> However, it seems when the websocket message is greater than ~ 8 KB
> (perhaps the value of org.apache.tomcat.websocket.textBufferSize)
> then Tomcat does not call the @OnMessage method, and sometimes it
> closes the websocket connection. This happens for BIO and NIO (I
> haven't checked with APR). The Javadoc for @OnMessage says that for
> "maxMessageSize" element: "Specifies the maximum size of message in
> bytes that the method this annotates will be able to process, or -1
> to indicate that there is no maximum. The default is -1." So,
> normally Tomcat should be able to receive such large messages,
> right?

Only if the endpoint supports partial messages. If partial messages are
not supported the connection should be closed with an error message.

> To reproduce: 1) Start Tomcat (current trunk) with NIO or BIO
> connector on 64-bit Windows with 64-bit Java 7. 2) Open the Chat
> example (http://localhost:8080/examples/websocket/chat.xhtml) with
> Firefox or IE. When you enter short messages they will be properly
> sent back to you. 3) Now construct a string that has 10000 characers
> and enter it in the chat type box. Tomcat will not send back that
> string. When debugging, you will notice that Tomcat does not call the
> OnMessage method. (I verified that the browser does send the message
> to Tomcat.) 4) Sometimes Tomcat now closes the connection. If it
> doesn't and you continue to send short messages Tomcat will also not
> be able to receive them.
> 
> I also added an @OnError method to the chat example with
> t.printStackTrace() but no stacktrace showed up in the console.
> 
> Would this be a bug?

Not closing the connection looks like a bug.

Mark

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


Mime
View raw message