-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anomalous RAM use by TLSSocket #5469
Comments
The RAM usage has caused an out of memory crash in the past:
|
In the other thread, @indutny wrote:
Unfortunately, I've only been able to reproduce this in production, and happens after the server becomes laggier and laggier (as GC pauses get longer and longer), which is an experience I wouldn't want to intentionally inflict on my users (hundreds of thousands daily, millions monthly). |
The best way to work around this issue in the short term is to is have some way to query the size of the write buffer, so I can detect this condition and stop writing to the socket before its write buffer gets too huge. Is that something that can be done? |
edit: nevermind, this appears to be an unrelated bug |
#5713 seems to have fixed this. |
Hi, this is an issue that again only seems to occur at load.
I first found it here: #3072 (comment) – Further testing revealed that it's probably unrelated to #3072.
Summary: In my app (actually an online game, but for the purposes of this bug report can be considered a WebSocket chatroom app with HTTPS support), a single TLSSocket's write buffer is taking up hundreds of megabytes of RAM.
Approximately equal (non-anomalous) amounts of data are being written to every socket, but every once in a while, a few TLSSockets' write buffers will get backed up.
Details and screenshots to follow in comments.
My app is somewhat commonly targeted by DoS attacks, so that is possibly the explanation. Preliminary inspection of the sockets in question appear legitimate, and consistent with the theory that a user disconnects, and reconnects again, but their first socket doesn't get properly closed, but nothing conclusive.
v5.7.0
,v4.3.1
(bug occurs in both)Linux smogon-sim 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
https
?The text was updated successfully, but these errors were encountered: