-
Bug
-
Resolution: Fixed
-
Normal
-
8.5.1.2
-
Security Level: Jimmy
-
Tomcat / Jetty behave differently
-
ZK 8.6.0 S1, ZK 8.6.0 S2
Steps to Reproduce
run the attached example
click the buttons to test the server's / client engine's behavior when the appserver's message size limits are exceeded (red buttons)
Current Result
Tomcat:
- shows error box at client side
- no error in server logs
- retries falling back to /zkau produce error code 467
- after cancelling /zkau continues to work
Jetty:
- no error box at client side
- exception at server side 'MessageTooLargeException: Frame is too large'
- no attempt to retry
- fallback to /zkau continues to work
Expected Result
- consistent error handling where possible, client side and/or server side
- reliable retry mechanism using /zkau fallback
Ideally detect message size limits and chunk them or use a streaming method
Debug Info
Root Cause
application server specific websocket request size limits
tomcat: 8192 bytes docs
jetty: 65536 bytes source
Workaround
on tomcat increase size limit (the default size 8kb is quite limiting)
e.g. 64kb which is the default in Jetty makes accidental problem less likely to happen
<context-param> <param-name>org.apache.tomcat.websocket.textBufferSize</param-name> <param-value>65536</param-value> </context-param>
see: https://tomcat.apache.org/tomcat-8.5-doc/web-socket-howto.html
- relates to
-
ZK-4434 websockets causing console error with wildfly
- Closed