1

I have a Coldfusion Websockets channel that streams data every 2 seconds. This has worked perfectly for some time, however I have now approximately doubled the amount of data being sent and I have problems when it comes to Chrome and Internet Explorer – they both come up with the following errors -

Websocket connecttion to 'ws://mywebsite.com' failed: Invalid frame header Uncaught TypeError: Cannot set property 'readyState' of undefined

Everything works perfectly on Firefox.

I am assuming the errors relate to the size of the packets and that they are not correctly specified in the header, since if I reduce the amount of data slightly everything works fine. I have increased the “Max Data Size” for websockets in Coldfusion Administrator but this does not fix the problem.

Any help with how to get this working would be greatly appreciated.

AlanJames
  • 127
  • 6
  • That's a weird one Alan. I'm guessing that nothing on the server side will help. I believe there is a frame size limit per RFC. Chrome is probably honoring that limit and FF (maybe using webkit?) is not. You may have to break your message up. – Mark A Kruger Apr 25 '16 at 14:05
  • Thanks for your response Mark. Regarding the RFC size limit, it appears that it is actually quite large - 18,446,744,073,709,551,615 bytes (maximum value of a 64-bit unsigned value) per frame, with no limit for a message comprised of multiple frames. The size I am talking about however is considerably smaller - being approx 100KB. So I was thinking that Coldfusion has some default maximum frame size and this needs to be adjusted to accommodate larger sizes - otherwise maybe the frame size is larger than specified in the header ? Maybe FF is more forgiving of this.. – AlanJames Apr 26 '16 at 01:11
  • Hmmm... I need to check on that. the 64bit frame size is too large for any practical purposes, I wonder if we are misreading that? I cannot imagine such a frame size succeeding when just about anything could screw it up. Even 100k is pretty big. – Mark A Kruger Apr 26 '16 at 19:47
  • Alan - check out the answer to this one: http://stackoverflow.com/questions/13010354/chunking-websocket-transmission . There is some insight there on how this all works that may help. – Mark A Kruger Apr 26 '16 at 19:49

0 Answers0