Bad Gateway error after update - please help


After update to 3.5.6, I get a 502 bad gateway on all sites.

I see this in the log: 2016/05/09 22:18:30 [error] 26667#26667: *49 connect() failed (111: Connection refused) while connecting to upstream, client:, server:, request: “GET / HTTP/1.1”, upstream: “fastcgi://”, host: “”

I am using redis+hhvm+nginx.

Any idea on how to fix this? I have tried re-installing nginx (mainline) and php, restart. But no luck so far.

service seems to be running: nginx : Running php5.6-fpm: Running mysql : Running

site info: Nginx configuration wp wpredis (enabled) PHP Version 5.6 Pagespeed disabled HHVM enabled

PHP seems to be running: root 11132 0.0 0.0 11740 920 pts/2 S+ 22:58 0:00 grep --color=auto php

Also tried to purge the PHP stack and then re-install. doesnt work.


looks like the issue can be reproduced when upgrading from latest repositories on ubuntu 14.04 , specifically when using apt-get upgrade / dist-upgrade


I have this exact problem after having done apt-get upgrade / dist-upgrade on a DigitalOcean Ubuntu 14.04 droplet half an hour ago.


Looks like the /run/php directory wasn’t created, but it’s expected to create the .pid file, so PHP is failing to start.


thanks for your replies!

any idea how to resolve this?

the run/php directory is indeed not present.

i have already removed and re-installed PHP. and also purged PHP and then re-installed. (using ee stack commands).

It seems this can be resolved quite easily, please let me know how, my sites are all down :frowning:

mkdir /run/php
service php5.6-fpm start

That should get it started.


yes, that did the trick! man, cant believe after so many hours of checking configs en reinstalling stuff, it was so simple.

thanks alot!


You are a life saver man! Did the trick after almost an hour of pain.


i believe the issues were fixed by php package maintainers on ubuntu. do another apt-get upgrade and restart your web stack (ee stack restart)


That is true. Just upgraded again. This is an LTS someone should really be testing these upgrades before putting them into the repositories.


yeah well, that’s not really up to the devs of EasyEngine. they are using packages from other third-party maintainers. for php it is the following:

Perhaps in the future the packages will all be maintained by them… Meanwhile, never update any packages or run any update commands on a live server without testing first! that means no apt-get upgrade , ee update or ee stack upgrade