Configuring VPS server on OVH / removing error
Good morning
I am writing regarding the issue with launching the build process of a Node.js (Next.js) application on our VPS from OVH's offer. For several days, we have been struggling with a persistent error: the npm run build process is interrupted with the message "Killed", despite available RAM resources and a configured SWAP file. Below are the details:
1. Description of the problem
- We use the VPS as an environment to host the frontend application (Next.js) and backend (Express.js) within a system called Production Console.
- The backend works correctly, but the frontend does not pass the build stage (npm run build) – the process gets interrupted.
- The error occurs even when manually increasing the memory limit (e.g., NODE_OPTIONS="--max-old-space-size=1024"), as well as with the SWAP file activated.
2. Server parameters
- VPS Ubuntu 20.04
- RAM: 4 GB
- Number of CPUs: 2 vCore
- SSD Disk: 80 GB
- SWAP: currently set to ~2 GB (2 SWAP files of 1 GB each)
3. What has been done so far
✅ Worked:
- The backend application (Express.js) runs correctly
- PM2 manages processes properly
- Nginx is running and configuration passes the test (nginx -t)
- SWAP activated, available space visible in free -m
❌ Not working:
- npm run build ends with the Killed error even with --max-old-space-size=1536
- Adding another SWAP file did not help
- Restarting pm2, nginx, and the VPS did not solve the problem
- On localhost, the frontend does not return data (curl returns (52) Empty reply from server)
- On the user side: 504 Gateway Timeout or ERR_EMPTY_RESPONSE
4. What I care about
I want to run the frontend of our Next.js application in a production environment – I care about:
- The ability to build the project (npm run build)
- A stable production environment without disruptions caused by memory shortages
Please provide information regarding cost / time
Best regards
-
2 days66 USD
538 3 2 2 days66 USDHello, ready to help with solving your problem.
Always available, contact me - personal correspondence
-
1 day66 USD
3931 112 6 1 1 day66 USDHello, I can do it, write to me
_______________________________
-
1 day67 USD
421 1 day67 USDI understand the frustration of your Next.js build failing with the "Killed" error. I’ve fixed similar issues before, and I can help resolve this quickly.
What I’ll Do:
Find the Cause – Check system logs to confirm if it’s a memory issue (OOM Killer).
Optimize Memory – Adjust Node.js and Next.js settings to reduce memory usage during build.
Fix SWAP/System Settings – Ensure SWAP is properly configured for better stability.
… Alternative Solutions – If needed, set up a remote build process (like GitHub Actions) to avoid VPS limitations.
-
1 day66 USD
274 0 1 1 day66 USDHello, I can gladly help with your issue. Inbox for linking.
-
7 days98 USD
461 7 days98 USDDear Piotr Kądzielski-Zysk,
I'm Chunhui Ouyang, a seasoned Linux Operations professional. I've been carefully reviewing your requirements, and from what you've described, it appears that the Out - of - Memory (OOM) issue you're facing might be due to insufficient memory. A common approach to address this is to utilize SWAP as a temporary substitute for physical memory. However, implementing this solution requires specific and meticulous steps.
Since I'm not fully aware of your actual system configuration and circumstances, I want to assure you that if you place your trust in me, as soon as we finalize our cooperation, we can commence troubleshooting and deployment services as early as the next day.
I'm proud to have an outstanding track record. I've successfully completed over 70 orders, which has equipped me with extensive experience and the ability to handle various complex situations. This experience allows me to provide high - quality, efficient solutions.
If you believe in my capabilities and are looking for prompt and professional assistance regarding your OOM issue or other related tasks, please don't hesitate to contact me.
…
Thank you.
Best regards,
Chunhui Ouyang
-
2 days66 USD
573 9 0 2 days66 USDWrite in private messages, I will help fix your problem.