Bad Gateway and php5-fpm.sock fail

I’m totally lost. I had a working droplet, but had to create a new one in conjunction with CloudFlare to shield the IP from DDOS. I took a snapshot of the existing droplet, created a new droplet from the snapshot, set up CloudFlare to point to the IP for the new droplet, and I get Gateway 502 error messages.
Error log shows: [error] 908#0: *38633558 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client

So at Support’s suggestion, I gave command: sudo service php5-fpm restart

But no joy. Same error message and gateway error.

Ran command again, and it returned another process number, but still no joy and same error msg about php5-fpm.sock failure

I don’t know what to do or how else to check anything. I really am new to this and SSH. The droplet shows it’s Ubuntu, if that helps. Heck, I don’t even know what tags to use for this request.


Show comments

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.

Hi, I’m experiencing the exact same problem, not sure how to fix it. I already restart a couple of times service php5-fpm restart.

the ls -lah /var/run/php5-fpm.sock is returning: www-data www-data 0 Dec 22 22:18 /var/run/php5-fpm.sock

and the status is running.

I already have cloudflare and 5 droplets connected. And I’m getting same error.

This is affecting our current website a lot.

Any help on this?