Question

Website took too long to respond (Temporal - After comes back to normal)

Hi. I have a VPS here. From time to time, all the websites hosted on the VPS don’t go through (“took too long to respond.”) by TIMEOUT. Then after some time it will again go through. but when i check the metrics, i don’t see any high utilization of CPU, Bandwidth or even disk I/O. what could possibly cause this temporal issue. But i can SSH into the server very well

Actually i host on an NGINX server that hosts subdomains on 2 domains. one runs on a docker container and i proxy it through the main NGINX while the other works directly under wordpress with the main NGINX server. I also have a phpmyadmin subdomain and all go down! I’m so confused


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.

Accepted Answer

SSH to the server

sudo apt(yum) install htop

then once installed just run

htop

This will show what processes are running and which are using more resources.

You would also tail logs.

cd /var/log
sudo tail -f syslog
sudo tail -f nginx/access.log
sudo tail -f php.XX.log

while tailing logs, browse your sites until you see traffic show in the logs, and experience the slow downs

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.

Hi there @tclarencek,

As you are able to SSH to the Droplet, it sounds like your Nginx service is experiencing some issues.

What I could suggest here is, the next time you notice the problem, SSH to your Droplet and do the following:

  • Check your Nginx error logs, you can do that with the following command:
  1. tail -100 /var/log/ngnix/error.log

You can also use this script here to summarize your access log.

  • Check your Nginx access logs for any suspicious activity:
  1. tail -100 /var/log/nginx/error.log
  • Check your Docker status:
  1. sudo systemctl status docker

Feel free to share any of the logs here so I could try to further advise.

Regards, Bobby