0

I have used spring sockjs server implementation for websockets. It supports messages upto 2kb but above that the websocket connection breaks -gives an 1006 error. If I reduce the message size, then it runs ok. I went through the docs as well as classes, but could get a place where I can increase this limit. Have asked in spring forum as well but no reply. Any Idea?

cpandey05
  • 1,241
  • 2
  • 17
  • 30

2 Answers2

0

Any stack traces in the server logs? What server? And what transport is being used (websocket, xhr-streaming, other?) For the WebSocket transport you may be hitting default limits on the message buffer. Have you seen the section on Configuring the WebSocket Engine in the documentation?

Rossen Stoyanchev
  • 4,910
  • 23
  • 26
  • I had asked a similar question got it resolved, The way its mentioned in document does not worked, see the link for how it got working: http://stackoverflow.com/questions/21730566/how-to-increase-output-buffer-for-spring-sockjs-websocket-server-implementation/21809239?noredirect=1#21809239, – cpandey05 Feb 21 '14 at 10:12
0

Got it resolved, the way spring document has mentioned, did not worked for me -tomcat would not pick the parameters from there. Finally getting hold of ServletServerContainerFactoryBean (which is always singleton) and setting the properties there worked for me. Details: How to increase output buffer for spring sockjs websocket server implementation.

Community
  • 1
  • 1
cpandey05
  • 1,241
  • 2
  • 17
  • 30