urgent: JavaScript heap out of memory

story-boards-aiPRO

10 months ago

our backend in Pro Plan keeps on crashing due to a heap out of memory fatal error. the memory graph shows it stalls at 8GB and goes back to 4GB once I restart. I tried adding this to my launch script: "start:prod": "node --max-old-space-size=16384 dist/apps/gateway/main" but that seems to have no effect. We should have 32GB available, no? Any idea how we can fix this?

Awaiting User Response

2 Replies

10 months ago

Try an environment (service) variable instead?

NODE_OPTIONS=--max-old-space-size=16384

And make sure your project is located within a Pro workspace.


10 months ago

Try out @brody's suggestion.

You can also check your service's metrics to see if it's using up the full 32GB -- if it's not, it would point to a bottleneck in your application instead of the platform.


Status changed to Awaiting User Response railway[bot] 10 months ago


urgent: JavaScript heap out of memory - Railway Help Station