We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25ac584 commit 39ecb71Copy full SHA for 39ecb71
httphandler/handler.go
@@ -4,6 +4,7 @@ import (
4
"fmt"
5
"net/http"
6
"runtime"
7
+ "runtime/debug"
8
)
9
10
const (
@@ -14,6 +15,8 @@ const (
14
15
// GCI returns the GCI HTTP handler, which controls Go's GC to decrease service tail latency.
16
// Ideally, GCI handler should be the first middleware in the service process chain.
17
func GCI(next http.HandlerFunc) http.HandlerFunc {
18
+ debug.SetGCPercent(-1)
19
+ fmt.Println("==< Automatic GC Disabled <==")
20
return func(w http.ResponseWriter, r *http.Request) {
21
switch r.Header.Get(gciHeader) {
22
case "":
0 commit comments