There is this strange behavior on a Golang service we are running. On some instances, there is a forced GC that gets triggered every 4 minutes. This can be observed when the `GODEBUG=gctrace=1` is turned on. There is a log line with `gc ... (forced)` every 4 minutes consistently on selected instances, with a few seconds off on each occurrence. It does not happen on all instances.
Based on the official golang documentation, `(forced)` is an indication that `runtime.GC()` is forcefully triggered by the application code, however, there is NO application code or third-party library code that does `runtime.GC()`. I am wondering if golang internally does anything that might have triggered the `runtime.GC()` - a.k.a - periodically forced GC operation? The log line that appears every 4 minutes looks something like: "*gc* 2009 @96075.949s 0%: 0.65+1314+0.13 ms clock, 39+0/19595/54342+8.2 ms cpu, 79719->80556->42707 MB, 123241 MB goal, 2 MB stacks, 1 MB globals, 60 P (*forced*)" -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/8f02ee32-3970-4145-902c-1dfedb374c2an%40googlegroups.com.