Fork me on GitHub
#aleph
<
2022-02-25
>
mattyulrich18:02:19

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?

hiredman18:02:03

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

hiredman18:02:54

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

mattyulrich18:02:15

Yes - there is a load balancer.

mattyulrich18:02:19

I'll try with a direct connection.

mattyulrich18:02:42

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

mattyulrich18:02:55

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

mattyulrich18:02:25

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

hiredman18:02:30

you maybe exceeding some max frame size thing

mattyulrich18:02:49

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

hiredman18:02:11

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

mattyulrich18:02:12

Are there settings for this on the aleph side?

mattyulrich18:02:41

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

hiredman18:02:13

| `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`.

hiredman18:02:04

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)

mattyulrich18:02:18

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

mattyulrich18:02:49

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