Can you inspect the memory use climbing while it’s happening?
Go to localhost:2019/debug/pprof on the instance and follow the link to the heap profile. The goroutine dump could be useful too. That’ll tell us where the code is at and what is making lots of allocations.
But since the provided config has been modified from its original, I can’t trust that that’s the real config. We’ll need the full, unmodified config to be able to help you and make suggestions. Otherwise all we can do is guess, which won’t be helpful. That memory and goroutine profile will also be necessary if we want to reduce memory usage.
If it works without memory issues on nginx, providing the full unredacted nginx config would also be useful to see if we’re comparing apples to apples.
Thanks