I’m running 3 projects on 1 Vagrant box. I was working on a project and suddenly I was hit with a 502 error. The other projects work fine, so I go to investigate:
$ tail -f /srv/www/website.com/logs/website.com.error.log
[error] 11841#0: *6 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: website.dev, request: "GET /wp/wp-cron.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm-wordpress.sock:", host: "website.dev"
After Google-ing the error I find many different answers, none of which seem to pertain to my problem. Some say to make sure the socket exists:
$ ls -la /var/run/ | grep "php5-fpm"
drwxr-xr-x 2 root root 40 Jul 15 03:58 php5-fpm
-rw-r--r-- 1 root root 5 Jul 15 22:59 php5-fpm.pid
srw-rw---- 1 www-data www-data 0 Jul 15 22:55 php5-fpm-wordpress.sock
Restarting nginx and php5-fpm yields no promising results. I’m not sure what direction to go with this, since I’m not very familiar with configuring nginx or php5-fpm.