nginx error 502 Bad gateway

The project is on Yii, but when you click on one of the menu items, it began to give a 502 bad gateway error. Log string:

2018/02/06 17:28:04 [error] 308#308: *50489886 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: мой_ип, server: admin.мой_сайт, request: "GET /client/report/total HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "admin.мой_сайт", referrer: "http://admin.мой_сайт/device"

What could be the problem?

Author: nörbörnën, 2018-02-06

2 answers

Nginx did not wait for a response from the script (if there is fcgi) or from Apache, if configured through it. I.e. something is slowing down in your code

 0
Author: Алексей Гусев, 2018-02-06 10:07:56

It turned out to be simple: I rebooted the service and it worked:

/etc/init.d/php7.0-fpm restart
 0
Author: Morph, 2018-02-07 01:02:00