whenever I'm running a react build command on my ubuntu machine its creating multiple instances of the command, running in the backgroud?

I have a go server running in a droplet with 2gb ram and single core cpu with 100gb storage , whenever i’m running the command"sudo npm run build:staging" to create the dashboard of my server , its creating multiple background processes and giving me running out of storage error!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
October 31, 2023

Heya, @souvikhaldarlobster

You can start with reviewing your build scripts - npm run build:staging to make sure they’re not creating unnecessary temporary files or excessive log data and creating multiple processes in the background (you can use a tool like ps aux to see a list of all running processes and their parent processes) .

You can check your current disk usage by running df -h or du -h in your server’s terminal. This will help you identify which directories or files are consuming the most storage. You can then remove unnecessary files or data to free up space.

Try running your build process in a Docker container. This can help to isolate the build process from the rest of your system and can also help to clean up temporary files automatically.


Site Moderator
Site Moderator badge
October 31, 2023


Review your Build Process: First, understand what npm run build:staging is doing. Check the scripts section in your package.json to see what commands are being executed. This will give you insight into why multiple background processes are being created.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel