I'm using facebook login on my Yii2 app by following this tutorial: https://mushtaqtahir.com/blog/2/facebook-authentication-using-yii2-authclient
It works without problems for months, but suddenly a problem occured. When I try to login, it give error 502 after succesfully logged in on Facebook and return to the app. I try to restart PHP FPM on the server. It works just once after PHP restarted, but continue to fail afterwards.
I check nginx error log and found this:
2017/05/31 05:49:30 [error] 7368#7368: *151 recv() failed (104: Connection reset by peer)
while reading response header from upstream, client: 103.47.104.104, server: my.app, request:
"GET /site/auth?authclient=facebook&code=AQA5h_.....gIdRKg&state=6a424...7efc
HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "my.app"
What might be the problem?