Answer the question
In order to leave comments, you need to log in
Php5-fpm + nginx + Xdebug. 502 bad gateway?
1) php works through socket. Switching to tcp does not help.
2) fast_cgi_read_timeout is set to 6000 request_terminate_timeout too, and everything related to max_execution. Actually, I run the debugger under Netbeans. While everything happens inside one script - the norms. As soon as it comes across a breakpoint in which thread of the included file, or F8 (input) in require or include there, immediately 502 bad gateway.
Where else to look, what to do. Nothing but a similar post on Habré, where the author found a solution (which didn’t help me) can’t be googled (
UPD: Solved: guys don’t install the latest version of xdebug pulled from dotdeb. 2.1.3 Apparently still a curve. Installed 2.1.0 - all problems have evaporated .
Answer the question
In order to leave comments, you need to log in
Give an entry from nginx log. Probably the same problem as when using FirePHP shikii.net/blog/firephp-on-nginx-502-bad-gateway/
Unfortunately, it didn't help(((
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
didn't work.
2012/03/02 17:55:41 [error] 4523#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.10, server:example.ru, request: "GET /index.php?XDEBUG_SESSION_START=netbeans-xdebug HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: " www.example.ru "
2012/ 02/03 17:59:52 [error] 4594#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.10, server: example.ru, request: "GET /index.php?XDEBUG_SESSION_START=netbeans-xdebug HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: " www.example.ru "
By default, php-fpm listens on the same port as xdebug. Check /etc/php5/fpm/pool.d
By default, php-fpm listens on the same port as xdebug
, I have a socket. There are no port conflicts.
xdedug set it to an excellent port - 9900 instead of 9000.
I tried it this way and that.
1) php works through socket. Switching to tcp does not help.
Of course, I'll try to play around with the size and number of buffers, but I'm afraid that's not the point at all.
Tried disabling php extensions. also useless 0.
interesting garbage finally ... if you debug inside one script - it's normal. if you run on includes / breakpoints - this pandemonium begins with socket error and 502
during an error, things like this happen:
php5-fpm.log:
WARNING: [pool www] child 14720 exited on signal 11
syslog
devsrv01 kernel: [365144.212259] php5-fpm[14720]: segfault at 42 ip 00000000006d0bd8 sp 00007fff32075080 error 4 in php5-fpm[400000+79e000]
/nginx/error.log
[error] 11572#0: *2063 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: XXX.XXX.XXX. XXX, server: example.com, request: "GET /index.php?XDEBUG_SESSION_START=NETBEANS-XDEBUG HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host : " www.example.com "
exception in IDE log
java.net.SocketException: Software caused connection abort: socket write error
java.net.SocketOutputStream
socketWrite0
${java.home}lib/rt.jar
java.net.SocketOutputStream
socketWrite
${java.home}lib/rt .jar
java.net.SocketOutputStream
write
${java.home}lib/rt.jar
org.netbeans.modules.php.dbgp.packets.DbgpCommand
send
90
${netBeansDir}modules/org-netbeans-modules-php-dbgp. jar
org.netbeans.modules.php.dbgp.DebugSession
sendCommands
211
${netBeansDir}modules/org-netbeans-modules-php-dbgp.jar
org.netbeans.modules.php.dbgp.DebugSession
run
143
${netBeansDir}modules/org-netbeans-modules-php-dbgp.jar
java.util.concurrent.Executors$RunnableAdapter
call
${java.home}lib/rt.jar
java.util.concurrent.FutureTask$Sync
innerRun
${java.home}lib/rt.jar
java.util.concurrent.FutureTask
run
${java.home}lib/rt.jar
java.util.concurrent.ThreadPoolExecutor
runWorker
${java.home}lib/rt.jar
java .util.concurrent.ThreadPoolExecutor$Worker
run
${java.home}lib/rt.jar
java.lang.Thread
run
${java.home}lib/rt.jar
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question