Hi,

Is there a way to set a hard limit on the max heap size a process is 
allowed to consume, from within it?
It's almost never a problem for a process to consume as much memory as is 
available, however, I've ran into real-life cases in a k8s environment, 
where a pod with a Go process will get evicted, when the pod approaches the 
memory limit of the node it's on.

Reducing GOGC improves the situation, however it doesn't act as a limit. 
And depending on the amount of data that's going through the process, it 
will still get evicted when it saturates the memory. I could also slow the 
whole process down, giving the GC even more time to reclaim the memory, but 
that sounds like a big workaround.

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/26f3527f-5469-4769-ba68-d7b2a5f25c3an%40googlegroups.com.

Reply via email to