You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found cause of the problem, this is deadlock on protocol level. I don't think it is possible to fix this problem. I will try to mitigate it with keep-alive timer.
v3 server has in-flight limit, but default it is 16 message, if client sends 16 publishes server stops reading from socket, implementation of publish service in subs example sends publishes to client and expect ack before it ack's client's publish, but if server stops reading incoming data it cannot read ack from client so all inflight publishes stays in queue and never resolves.
Tricky. Wouldn't it work if (in this case) the socket would be closed, and so at least the session could be cleaned up? Sending either a "peer gone" event, or some dedicated "session overflow" event?
problem is that we pause read/write operations on socket, we cannot get disconnect event from it. i’ve been thinking about timeout if socket operations stop, i will try to build something next couple days
I have the feeling there is a session leak in the server code in case the server gets "too many" messages.
This is the scenario:
Use the
subs.rs
exampleInstead of returning
Ok()
in the publish method, use:Implement
Drop
forMySession
, print out somethingNow when you send one message, it processes it, fails, closes the connection and prints out the message from
drop
.If you send e.g. 20 messages at once, it processes all of the, closes the connection, but doesn't print out the message. This is pretty reproducible.
My assumption is, the session is still lingering somewhere.
The text was updated successfully, but these errors were encountered: