WebSocket-Node
WebSocket-Node copied to clipboard
Transfer interruption
On our distributed filesystem, written in javascript and working with Websockt-Node, we found a strange problem. At first we thought this bug was very randomly so we couldn't find on which codepart of our self, or which library we must look. So the problem is, that we send files all the time and after x sent file, the connection was so slow, that we thought there was a breakup of the websocket connection. Important to know, that the connections was allways good, just at one file, the connection was suddenly slow and in our testcase, there was no parallel file sending. Due to this, we build a tiny testcase, that sends long textmessage (also tested with files) from client to server. But we don't have both, client and server, on one machine. If we run the test on our dev server only, that works fine. But if we run the serverpart on an extern server, the bug occurs. Beetwen our testserver there is a latency of 1-6 ms.
In more detail, if you add logging in Websocket-Node, you can see, that data is incoming from time to time on server side. But the frames are all smaller comparing to a successfull message transfer. In addition we analyzed both sides with repl and we figured out, that on clientside the outgoingFrameQueue is filled with frames, and on serverside the websocketconnection must wait for incoming data.
Now we don't have an idea, where the problem is and we hope you or anyone else can help us, so we can use Websocket-Node anymore.#
Thanks.
PS: We found two posts on stackoverflow, where a problem was descriped like we have:
http://stackoverflow.com/questions/22798300/websockets-with-node-js-garbage-in-packet-capture-and-socket-resets
http://stackoverflow.com/questions/22369636/websocket-messages-mysteriously-disappear
You can find our testcase here: https://github.com/Lukewa/filetransferTest
The second stack overflow question doesn't indicate a problem with this package, because the problem also exists in a python websocket implementation. I have assumed that its some kind of issue with my machine itself. The first issue - I still don't know.
To be entirely honest, I'm not quite sure I'm following what you're reporting here?
Using your test code between my machine and a remote server, I'm not able to reproduce any problem with the current release version of WebSocket-Node.