Unverified Commit aead6cbc authored by M. Mert Yıldıran's avatar M. Mert Yıldıran Committed by GitHub
Browse files

Bring back `debug.FreeOSMemory()` call to prevent `OOMKilled`(s) (#1063)


* Revert "Revert "Bring back `debug.FreeOSMemory()` call""

This reverts commit 69538cb7e3f4bf5ab0385667bb49acbe41f9a4b2.

* Revert "Revert "Revert "Remove `GOGC` environment variable from tapper"""

This reverts commit 3d9f37ab4bbb880c0428826877d02d317a0c478f.

* Revert "Revert "Revert "Revert "Remove `GOGC` environment variable from tapper""""

This reverts commit 58ff0607ffd7d9ba1a9432355b1f93f68d067866.
Co-authored-by: default avatargadotroee <55343099+gadotroee@users.noreply.github.com>
parent 2f89690d
Showing with 2 additions and 0 deletions
+2 -0
......@@ -2,6 +2,7 @@ package tap
import (
"runtime"
_debug "runtime/debug"
"sync"
"time"
......@@ -47,6 +48,7 @@ func (streamMap *tcpStreamMap) CloseTimedoutTcpStreamChannels() {
for {
<-ticker.C
_debug.FreeOSMemory()
streamMap.streams.Range(func(key interface{}, value interface{}) bool {
// `*tlsStream` is not yet applicable to this routine.
// So, we cast into `(*tcpStream)` and ignore `*tlsStream`
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment