I recently upgraded my project from the v6 RC to the official 6.0.6 version. I’m hosting my project on Render.com and I’m using the free tier while I prototype, so I have a tiny CPU/RAM etc. But in any case, I’m seeing intermittent out-of-memory errors, and I don’t think anything changed on the frontend aside from the upgrade. Error message:
Server unhealthy
Ran out of memory (used over 512MB) while running your code.
512MB is tiny, to be sure, but I’m curious if there is something larger than expected in 6.0.6 vs the v6 RC.
Hmm, the only time I’ve seen this memory limit error is during deployment. For hobby/dev projects, based on my experience, agreed you should be ok. But
Do try the latest patched version for v6, v6.0.7 and let me know if there’s any improvements. The performance fixes are mostly for AWS Lambda infra, but maybe they were also affecting Render if just subtly.
I’ve upgraded to 6.2.0, but I’m still having memory errors during deployment. I think it’s due to DB migrations though. The log has errors like this, where I think the exit code 137 is the out of memory error.
I haven’t been making any DB migrations recently; I think these are all old from initial schema development. Any ideas if this memory error is expected, when I’m running with only 512 MB RAM?
I could upgrade to 2GB on render.com but I wasn’t sure if this was the problem or if I’m doing something wrong. Also the prices for a mere 2GB of ram seem steeper than I expected, so maybe I should look around for other deployment options, but that’s a different story!
Ah yeah I have the same problem with my Build Competition’s project deployment - didn’t want to deal with it so for the month I’m on the 2gb plan, but it is quite expensive for a hobby project.
Redwood shouldn’t be running out of memory with only one user, definitely seems like something is off. I haven’t had this issue with a larger project with more users that’s still on v5 - haven’t wanted to upgrade yet specifically because of this issue.
I haven’t tried this out yet, but this is what the Render team suggested:
To prevent NodeJS’s underlying V8 engine from allocating more heap space memory than what your service allows for, try setting an NODE_OPTIONS environment variable with the value --max-old-space-size=1536 . Change the value to 920 for a 1GB instance and 460 for a 512MB instance. These values are just rough guides, you may be able to increase it or need to lower it depending on how your application uses its memory.
Thanks for the suggestions here. I tried several values of --max-old-space-size but never was able to get this working.
I’m going to try to switch over to Vercel and see if that works any better. My only concern is that its Postgres and Python serverless options are both in “Beta”. I have a separate python backend API so I really need python, but I think serverless might be better anyway if I can get it working.