Hello,
I have an application under ruby on rails, Apache with passenger and postgresql database, I have the problem that the server is constantly down, to fix this, I have to enter from the terminal to reset the server, digital reports that the server is running at 100%, I think that is running a process in bakground which is doing down the server If someone knows that it can be or have any idea of how to solve it I would be a great help, Thanks a lot.
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!
Dealing with resource issues can be difficult. As such, you will want to gather more information and investigate what might be causing the resource issues. Some commands that might help you are:
sudo iotop -abkotn 3
sudo top -bn1 -o %CPU|head -n 25
sudo netstat -atn|grep :80|awk '{print $6}'|sort|uniq -c
If the iotop command is not installed, you can install it by running this command:
sudo apt-get install iotop
If you do not already have it on your droplet, you might also wish to install the sysstat package. This package includes sar, which logs resource usage for the droplet in timed intervals. It is quite useful for seeing what resources were being used when a droplet crashes or has issues. You can install it via:
sudo apt-get install sysstat
Being it is running via Passenger, you might also want to check the Apache and Passenger logs to see if any recurring errors are causing issues, or if any bad requests are occurring.
Hope it helps, Jason Colyer DigitalOcean Platform Support Lead
Hello there,
I will strongly recommend ensuring you’ve added a SWAP file as this can be an issue related to the droplet’s memory.
You can examine the server logs and ensure the droplet is not running out of memory.
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.