I have a docker image and my instance is out of memory error.
Error:
Out of memory: Killed process 2523954 (node) total-vm:1906512kB, anon-rss:1026256kB, file-rss:0kB, shmem-rss:OkB, UID:0 pgtables:4992kB oom_score_adj:0
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!
A $5 droplet isn’t enough to host Docker apps. I upgraded to a $10 instance and these errors doesn’t show up anymore.
Hi @rameshbhalla81,
Do you have SWAP configured? If not I would recommend you to do so.
Swap is an area on a hard drive that has been designated as a place where the operating system can temporarily store data that it can no longer hold in RAM. Basically, this gives you the ability to increase the amount of information that your server can keep in its working “memory”, with some caveats. The swap space on the hard drive will be used mainly when there is no longer sufficient space in RAM to hold in-use application data.
You can follow this tutorial here to see how you can add it:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04
Regards, KFSys
Heya,
I’m sorry to hear about your experience. If you’re having issues with processes being killed due to memory issues you can start with examining the logs and also monitor the resource usage on your droplet.
You can check this article on how to monitor the resource usage on your droplet:
Tools like MySQL Tunner can help you to optimise the configuration of the MySQL service by adjusting the values in the my.cnf file.
You can find more information about the MySQL tunner script in this mini tutorial here:
Adding a swap file can also benefit the performance.
https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.