Report this

What is the reason for this report?

Apache server goes down constantly

Posted on February 8, 2016

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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.