Report this

What is the reason for this report?

Fixing bad gateway issue 502

Posted on July 4, 2017

Hi everyone,

From time to time my website is getting error 502 bad gateway or just simply doesent loading up. When I’m looking at the graphs of CPU usage I’ve realized that when I want to edit some posts on wordpress the CPU usage increasing to high levels like 90%.

What I’m supposed to do, restart the droplet or resize the plan? When I do this everything will be good?



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.

Hi @brzezickiandrzej

What web server are you using, Apache or Nginx? Which version? And which version of PHP? Are you running Ubuntu 14.04 or a different version?

When you have the problem with high CPU, which process is eating everything? You can run the command top to see processes and amount of CPU+RAM they eat.

Usually the problem is rooted in a bad plugin in WordPress, since the way it’s crashing. How big is your droplet?

I’m using Nginx 1.1.0.5, Ubuntu 14.04.

How I am supposed to check which plugin is causing the problem? Screenshot of console

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.