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

Bobby Iliev
Site Moderator
Site Moderator badge
April 10, 2020

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

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.