Fixing bad gateway issue 502

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?


Submit an 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.

I’m using Nginx, Ubuntu 14.04.

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

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?