crypto/tls: outBuf of Conn costs too much memory for large number of idle connections #42035
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
We are opening TLS on our online mesh project, which runs in a memory-limited situation. Currently, the TLS costs too much memory in some special apps which have about 100,000 connections
It can be calculated easily: 100,000 * max size of tlsConn.outBuf(16KB + some extra bytes) ≈ 1.6 GB(after go 1.12,), which can cause the process to OOM.
Most of the connections are idle, but still, use much memory because of this outBuf
What did you expect to see?
Don't use so much memory for massive idle tls connections
What did you see instead?
the process is killed by os because of OOM
The text was updated successfully, but these errors were encountered: