Out of ram error when building
Unanswered
maslomeister posted this in #help-forum
Hi there, i have small nextjs project and my own vps, vps has 3gb of ram and has a bit of stuff running on it, so on average it consumes around 1.5gb of ram, whenever i try to build my nextjs prject the ram usage spikes up to 3gb at "Linting and checking validity of type" and then crashes because i don't have enough ram and i don't have swap
Is there any way to somehow build my project locally and then transfer that build to my server? I don't really want to change server configuration or do anything else to the server because 4gb is plenty for my needs
Is there any way to somehow build my project locally and then transfer that build to my server? I don't really want to change server configuration or do anything else to the server because 4gb is plenty for my needs
4 Replies
Toyger
you can build docker image locally
https://nextjs.org/docs/app/building-your-application/deploying#docker-image
and then copy it to your vps, probably easiest way with docker hub, it have 1 private repository in free plan.
https://nextjs.org/docs/app/building-your-application/deploying#docker-image
and then copy it to your vps, probably easiest way with docker hub, it have 1 private repository in free plan.
wouldn't docker itself consume way more ram in day to day operations?
thanks