Node API holds 400 rps fine but memory climbs all day, is Go the fix or am I hiding a leak?
Express in front of Postgres, one 2 vCPU box, restarts itself nightly which is the only reason we do not fall over. Resident memory starts around 200MB after a deploy and is comfortably over a gigabyte by the evening, every day, whether traffic is heavy or not. The team is JavaScript native and rewriting in Go is being floated as the solution. I would like to know whether anyone has actually made this exact move and whether the memory problem followed them.
@two_vcpu_club · 2w ago
Also worth separating leak from heap growth, because they look identical from the outside. A garbage collected runtime will happily let the heap grow toward whatever ceiling it thinks it has before it works hard at collecting, and on a small box the defaults are not always what you want. Try pinning the old space limit to something well under your container limit and watch whether the curve flattens and stabilises rather than climbing. If it flattens, you never had a leak, you had a runtime doing exactly what it was told. If it still climbs and then the process dies, it is a real leak.
Reply
Report