Apache2 randomly stops working

I’m fairly new to Apache2, and I’ve been using it for my website. Most of the time it works flawlessly, however at random times throughout the day it stops working and attempting to access the site returns ERR_TIMED_OUT on Chrome. This happens globally and is not specific to my IP or browser.

The access log mostly contains 502 codes and the error log is flooded with Error reading status line from remote server and The timeout specified has expired

I can’t find any solution to this issue despite how hard I look and it’s been driving me mad for months. It’s also worth mentioning that I have letsencrypt set up, which could be the problem.

Help would be greatly appreciated. Please tell me if there’s any other details I should share.

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.

The netstat -plant is a good one. I also had really weird issues with Apache, starting just a day after installing a fresh droplet. Netstat showed that hundreds of ip’s were connecting to :443. After duckduckgo’ing the IP, it was on a list of free Telegram proxies.

So probably the former user of the droplet hosted a free proxy server. Only option is to create a snapshot of the droplet, create a new droplet and delete the current one.

Sadly this will be an issue for the next user which gets this IP ( assigned.


According to the error, it seems like that it’s not an Apache issue but an issue with your backend.

Would you mind posting the full error that you see in the error logs?

Also can you let me know what are you using as a backend? And how exactly do you fix this issue when it occurs?

Regards, Bobby