Question

Apache server goes down constantly

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.

Show comments

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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