[SHUTDOWNE] Memory usage Exceed - How to remove Remix application (nodeJS)


I have an remix app for making books and it’s quit loud in memory usage, sometimes, the app shut down because of too much memory,

Do you know how i could swipe the memory in my nodejs instance ?

Thanks a lots, Lucas from poesie.io

Not entirely sure what you mean by swipe the memory …

If the app’s crashing and not restarting, make sure Fly knows to restart the app. Add e.g a http healthcheck and set restart_limit as e.g 1. That way if the app runs out of memory, it will be auto-restarted.

If the memory usage shown in your graph is expected, well then the simplest option would be allocate more RAM to the vm.

You can limit/control the amount of memory node can use using this flag (note that newer versions of node are better at garbage collection etc and so if you can, use the latest version) e.g for 2GB:

node index.js --max-old-space-size=2048
ENV NODE_OPTIONS=--max_old_space_size=2048

If that memory usage seems wrong, it may take some debugging to see if there is a memory leak or what’s using it. This page has some helpful tips. Ignore the commercial bit at the bottom (they want to use their service!) but the first 90% is handy to see what’s going on:

Thanks Greg i will have a look !

The VM already the maximum of RAM allowed !

I will le the thread now

1 Like