In the past, I used apache + mod_php + xdebug + netbeans to develop my site (the server is my local machine working with Debian Squeeze), with pleasure - xdebug worked as expected, debugging sessions can be started and stopped at any time, when i need it. But when I switched to nginx + php_fpm + xdebug + netbeans, I had some debugging problems.
- My debugging session can be very long (much more than 30 seconds) and it seems that nginx could not wait for so long, it shows “504 Gateway timeout error” . I tried many recommendations to solve this problem, but no luck. Although, this is not very important for me, since the debugging of the session itself continues to work, and it is a little inconvenient.
- My debugging session can only be started once, so if I stopped it and try to start debugging again, netbeans will not be able to accept the xdebug connection (it says "Waiting for xdebug connection" and this is forever). After rebooting netbeans, the debugging session can be started again normally.
- In the following cases, which I could not understand, debugging is “enabled for all php scripts” and prevents any other scripts from being run. For example, I start a debugging session on my website http: //mysite.local/index.php and work with it. After some time, I noticed that my administrator (located on intranet.local / adminer.php) does not start, the browser tries to load the page for some time, and then shows “Gateway 504 timeout error”, If I see this behavior, I can just terminate the xdebug debugging session in netbeans, and all other scripts will start working fine.
Now, when I write this question, I have done some research and found that if I started a debugging session within a few seconds, then stop it and start again - it will start normally. It seems that the problem occurs after some time of active debugging.
My system and applications: Debian compression: 2.6.32-5-686 Nginx: 1.4.1 (from dotdeb repository) php5-fpm: 5.3.26-1 ~ d (from dotdeb repository) php5-xdebug: 5.3.26-1 ~ d (from dotdeb repository) netbeans: 7.3
My configuration:
Writing to the nginx error log file if it cannot wait for the script or other script to be debugged, blocked by problem No. 3 mentioned earlier:
2013/08/14 14:40:16 [error] 4822 # 0: * 111 timeout by time (110: connection timeout) while reading the response header up, client: 192.168.100.1, server: intranet.local, request : "GET / adminer.php? Username = root & db = devel & table = user HTTP / 1.1", upstream: "fastcgi: //127.0.0.1: 9999", host: "intranet.local", referrer: " https: // intranet .local / adminer.php? username = root & db = devel "
The php-fpm logs do not contain ANY error messages ...
I do not like to bother everyone with my problems and always try to solve it myself. But in this case, I have been fighting this for some MONTHS without any luck ... If someone has encountered these problems or you have a working configuration for use with nginx + php-fpm + xdebug + netbeans - please help me :)
source share