Fleck
Fleck copied to clipboard
Server side queue limit
#265
:white_check_mark: Build Fleck 0.0.43-ci completed (commit https://github.com/statianzo/Fleck/commit/4240f14f6a by @)
:white_check_mark: Build Fleck 0.0.43-ci completed (commit https://github.com/statianzo/Fleck/commit/4240f14f6a by @)
I implemented it so that it doesn't alter the current behavior without explicitly specifying it, this way, people can simply update without worrying.
I implemented it so that it doesn't alter the current behavior without explicitly specifying it, this way, people can simply update without worrying.
I'll release it as a major version bump to indicate possible breaking behavior.
So, you want me to change to a default 5Mb limit ?
:white_check_mark: Build Fleck 0.0.44-ci completed (commit https://github.com/statianzo/Fleck/commit/6dbf9fd87b by @)
:white_check_mark: Build Fleck 0.0.44-ci completed (commit https://github.com/statianzo/Fleck/commit/6dbf9fd87b by @)
I know I'm pretty late here, but I would rather using a BlockingCollection
than throwing away the messages in this case.
I know I'm pretty late here, but I would rather using a
BlockingCollection
than throwing away the messages in this case.
That would allow slow clients to use up the threadpool, giving the same resource exhaustion issue Fleck has (#265), just with threads instead of memory.
I know I'm pretty late here, but I would rather using a
BlockingCollection
than throwing away the messages in this case.
It's not throwing away the messages, it's closing the connexion because the client can't keep up, it's a pretty common mechanism in network communications.
Any news on this being merged?
Just to let you know, i forked and deployed this in production, it works well, and i don't have memory issues anymore.
Thanks for the update Renaud.
I tried this, but unfortunately it doesn't work for my application. I'm still narrowing down the issue I'm having, but so far it seems that when clients using smartphones connect to my Fleck server, then leave the web page (without closing it) the connection is left open. This is expected. However, the connection never seems to close, even when the device goes offline. This makes the messages the server sends (every 10ms or so) pile up and significantly increase memory usage.
You used the code i changed in the PR ?
You used the code i changed in the PR ?
Yes. I solved the problem by enforcing a heartbeat to be sent by the client. If the client stops sending heartbeats, the server closes the connection.