Fork me on GitHub

Hi all - I'm using aleph 0.4.6 to create websocket client connections (using aleph/websocket-client). When I connect to a locally running server, all of my writes and reads are good. But when I connect to a remote server, after certain writes (consistently reproducible), the connection just closes seemingly from the client side. Is there any way I can get some debug information around the connection to try and understand why it is disconnecting?


reproducible how? you write the same data and it disconnects? it disconnects after the same amount of time?


a good first step would be to make sure the client and server are the only things involved, if you have some kind of load balancer / proxy in the middle somewhere, try with a direct connection


Yes - there is a load balancer.


I'll try with a direct connection.


Reproducible meaning the same write always yields disconnect, multiple other writes work fine.


It may be on the server... actually - investigating further.


But is there a way that I can see more about the connection on the client short of sniffing the traffic?


you maybe exceeding some max frame size thing


Yeah - I think that's what's happening - I'm getting a large payload when I connect using a python client.


ah, it is a write from the server that is killing it?


Are there settings for this on the aleph side?


I send a request, then I get a response from the server and it triggers a disconnect; seemingly from the client.


| `max-frame-payload` | maximum allowable frame payload length, in bytes, defaults to `65536`.
   | `max-frame-size` | maximum aggregate message size, in bytes, defaults to `1048576`.


the websocket protocol itself can break up large data over multiple frames, which is why there are two settings there, max-frame-payload is the max for a single frame, and max-frame-size is the max it will allow when recombining multiple frames (I think)


Gotcha.. I think this is the problem - my response is 450k bytes; other payloads that work are 15k bytes...


Yup - this is the guy! I put a limit on the response and now it's working. Thanks for the help here!