Nginx – 502 Bad Gateway – bílá smrt

Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
sikulam
Člen | 12
+
0
-

Ahoj,
zkouším rozjet čisté nette na firemním serveru a po spuštění vypíše:

502 Bad Gateway
nginx

Při otestovaní přes Requirements Checker je vše OK
Jedinný warning je u Bundled GD extension.

Na složky TEMP i LOG jsem nastavil 777.
Ve složce log je pouze soubor .gitignore
Ve složce temp/cache/nette.configurator je vytvořen soubor Container_xxxx.php.lock s 0 velikostí
Ve složce temp/cache/_Nette.RobotLoader je pak soubor _xxxxx s velikostí 905

V logu nginx je

2016/10/19 08:51:13 [error] 35021#0: *15986 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 188.116.92.81, server: admin.xxx.cz, request: "GET /www/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "admin.xxx.cz"
2016/10/19 08:51:16 [error] 35021#0: *15986 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 188.116.92.81, server: admin.xxx.cz, request: "GET /www/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "admin.xxx.cz"

Nenapadá někoho čím by to mohlo být a co bych měl ještě vyzkoušet? Na serveru běží několi webů a eshop na prestashopu a vše funguje tak jak má.

Děkuji za jakoukoliv radu.

sikulam
Člen | 12
+
0
-

Zde je pak ještě debug log

2016/10/19 09:12:40 [debug] 37573#0: *19555 http finalize request: -4, "/www/index.php?" a:1, c:3
2016/10/19 09:12:40 [debug] 37573#0: *19555 http request count:3 blk:0
2016/10/19 09:12:40 [debug] 37573#0: *19555 http finalize request: -4, "/www/index.php?" a:1, c:2
2016/10/19 09:12:40 [debug] 37573#0: *19555 http request count:2 blk:0
2016/10/19 09:12:40 [debug] 37573#0: *19555 http run request: "/www/index.php?"
2016/10/19 09:12:40 [debug] 37573#0: *19555 http upstream check client, write event:1, "/www/index.php"
2016/10/19 09:12:40 [debug] 37573#0: *19555 http upstream recv(): -1 (11: Resource temporarily unavailable)
2016/10/19 09:12:40 [debug] 37573#0: *19555 http upstream request: "/www/index.php?"
2016/10/19 09:12:40 [debug] 37573#0: *19555 http upstream dummy handler
2016/10/19 09:12:41 [debug] 37573#0: *19555 http upstream request: "/www/index.php?"
2016/10/19 09:12:41 [debug] 37573#0: *19555 http upstream process header
2016/10/19 09:12:41 [debug] 37573#0: *19555 malloc: 00000000036DA050:32768
2016/10/19 09:12:41 [debug] 37573#0: *19555 recv: fd:16 -1 of 32768
2016/10/19 09:12:41 [error] 37573#0: *19555 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 188.116.92.81, server: admin.xxx.cz, request: "GET /www/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "admin.xxx.cz"
2016/10/19 09:12:41 [debug] 37573#0: *19555 http next upstream, 2
2016/10/19 09:12:41 [debug] 37573#0: *19555 free rr peer 1 4
2016/10/19 09:12:41 [debug] 37573#0: *19555 finalize http upstream request: 502
2016/10/19 09:12:41 [debug] 37573#0: *19555 finalize http fastcgi request
2016/10/19 09:12:41 [debug] 37573#0: *19555 close http upstream connection: 16
2016/10/19 09:12:41 [debug] 37573#0: *19555 free: 000000000314A0A0, unused: 48
2016/10/19 09:12:41 [debug] 37573#0: *19555 event timer del: 16: 1476861280925
2016/10/19 09:12:41 [debug] 37573#0: *19555 reusable connection: 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 http finalize request: 502, "/www/index.php?" a:1, c:1
2016/10/19 09:12:41 [debug] 37573#0: *19555 http special response: 502, "/www/index.php?"
2016/10/19 09:12:41 [debug] 37573#0: *19555 xslt filter header
2016/10/19 09:12:41 [debug] 37573#0: *19555 charset: "" > "utf-8"
2016/10/19 09:12:41 [debug] 37573#0: *19555 HTTP/1.1 502 Bad Gateway
Server: nginx
Date: Wed, 19 Oct 2016 07:12:41 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 166
Connection: keep-alive

2016/10/19 09:12:41 [debug] 37573#0: *19555 write new buf t:1 f:0 000000000384D900, pos 000000000384D900, size: 165 file: 0, size: 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 http write filter: l:0 f:0 s:165
2016/10/19 09:12:41 [debug] 37573#0: *19555 http output filter "/www/index.php?"
2016/10/19 09:12:41 [debug] 37573#0: *19555 http copy filter: "/www/index.php?"
2016/10/19 09:12:41 [debug] 37573#0: *19555 xslt filter body
2016/10/19 09:12:41 [debug] 37573#0: *19555 http postpone filter "/www/index.php?" 000000000384DAC0
2016/10/19 09:12:41 [debug] 37573#0: *19555 write old buf t:1 f:0 000000000384D900, pos 000000000384D900, size: 165 file: 0, size: 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 write new buf t:0 f:0 0000000000000000, pos 0000000001387500, size: 120 file: 0, size: 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 write new buf t:0 f:0 0000000000000000, pos 0000000001388960, size: 46 file: 0, size: 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 http write filter: l:1 f:0 s:331
2016/10/19 09:12:41 [debug] 37573#0: *19555 http write filter limit 11534336
2016/10/19 09:12:41 [debug] 37573#0: *19555 writev: 331 of 331
2016/10/19 09:12:41 [debug] 37573#0: *19555 http write filter 0000000000000000
2016/10/19 09:12:41 [debug] 37573#0: *19555 http copy filter: 0 "/www/index.php?"
2016/10/19 09:12:41 [debug] 37573#0: *19555 http finalize request: 0, "/www/index.php?" a:1, c:1
2016/10/19 09:12:41 [debug] 37573#0: *19555 set http keepalive handler
2016/10/19 09:12:41 [debug] 37573#0: *19555 http close request
2016/10/19 09:12:41 [debug] 37573#0: *19555 http log handler
2016/10/19 09:12:41 [debug] 37573#0: *19555 run cleanup: 00000000031367A8
2016/10/19 09:12:41 [debug] 37573#0: *19555 close cached open file: /var/www/admin.xxx.cz/httpdocs/www/index.php, fd:14, c:2, u:3, 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 run cleanup: 00000000031365C8
2016/10/19 09:12:41 [debug] 37573#0: *19555 close cached open file: /var/www/admin.xxx.cz/httpdocs/www/index.php, fd:14, c:1, u:3, 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 run cleanup: 0000000003136308
2016/10/19 09:12:41 [debug] 37573#0: *19555 close cached open file: /var/www/admin.xxx.cz/httpdocs/www/index.php, fd:14, c:0, u:3, 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 run cleanup: 00000000031361F8
2016/10/19 09:12:41 [debug] 37573#0: *19555 free: 00000000036DA050
2016/10/19 09:12:41 [debug] 37573#0: *19555 free: 0000000003BD3CC0, unused: 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 free: 0000000003135D30, unused: 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 free: 000000000384D060, unused: 1376
2016/10/19 09:12:41 [debug] 37573#0: *19555 free: 0000000003D577A0
2016/10/19 09:12:41 [debug] 37573#0: *19555 hc free: 0000000000000000 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 hc busy: 0000000000000000 0
2016/10/19 09:12:41 [debug] 37573#0: *19555 tcp_nodelay
2016/10/19 09:12:41 [debug] 37573#0: *19555 reusable connection: 1
2016/10/19 09:12:41 [debug] 37573#0: *19555 event timer add: 4: 10000:1476861171013
2016/10/19 09:12:41 [debug] 37573#0: *19555 post event 00000000040F0970
2016/10/19 09:12:41 [debug] 37573#0: *19555 delete posted event 00000000040F0970
2016/10/19 09:12:41 [debug] 37573#0: *19555 http keepalive handler
2016/10/19 09:12:41 [debug] 37573#0: *19555 malloc: 0000000003D577A0:2048
2016/10/19 09:12:41 [debug] 37573#0: *19555 recv: fd:4 -1 of 2048
2016/10/19 09:12:41 [debug] 37573#0: *19555 recv() not ready (11: Resource temporarily unavailable)
2016/10/19 09:12:41 [debug] 37573#0: *19555 free: 0000000003D577A0
thunderbuff
Člen | 164
+
0
-

@sikulam Ahoj, vyřešils to nějak? Zápasím s něčím velmi podobným. Po přechodu na nginx dostávám chybu 502 vždy, když skript pošle hlavičku Location – ale pouze, pokud je zapnutý debug mód. PHP spadne na sigsegv.

sikulam
Člen | 12
+
0
-

@thunderbuff Ahoj, vyřešil jsem to tak že jsem server přehodil na PHP7 a pak to začalo fungovat.