码迷,mamicode.com
首页 > 其他好文 > 详细

xdebug 一直报错 upstream timed out (110: Connection timed out) while reading response header from upstream

时间:2016-06-16 17:38:59      阅读:1184      评论:0      收藏:0      [点我收藏+]

标签:

本地主机(Windows环境192.168.66.1)访问虚拟机(192.168.66.139)里面的搭建的php环境(系统centos6.5版本,php版本是5.5.30 ,xdebug 2.4.0),通过命令行pecl install xdebug安装的xdebug,

 

在php.ini配置xdebug

[Xdebug]
zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
xdebug.auto_trace = On
xdebug.idekey = phpstorm
xdebug.remote_connect_back = On
xdebug.auto_trace = On
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
xdebug.remote_enable = On
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = 1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.profiler_enable=On
xdebug.trace_output_dir = "/tmp/xdebug2222/"
xdebug.profiler_output_dir = "/tmp/xdebug/"
xdebug.remote_mode = req

反问页面index.php,页面一直卡死,查看nginx错误日志,发现一直有upstream timed out (110: Connection timed out) while reading response header from upstream

php-fpm一直报超时的错误,应该是php-fpm返回请求超过了设置的时间,但是一直不知道为什么会报错,脚本也没问题,

发现xdebug.remote_connect_back = On把这行注释掉之后,就没问题了,邪门啊。

官网地址:https://xdebug.org/docs/all_settings#remote_connect_back

官网给出的这个这个参数的解释是

xdebug.remote_connect_back
Type: boolean, Default value: 0, Introduced in Xdebug > 2.1
If enabled, the xdebug.remote_host setting is ignored and Xdebug will try to connect to the client that made the HTTP request. It checks the $_SERVER[‘REMOTE_ADDR‘] variable to find out which IP address to use. Please note that there is no filter available, and anybody who can connect to the webserver will then be able to start a debugging session, even if their address does not match xdebug.remote_host.

大概意思是,设置了这个参数之后,xdebug返回数据时就不会只返回给xdebug.remote_host参数设置的IP了,任何ip请求都会返回数据,这样就可以多人共享这台服务器的php xdebug环境了。

不过还是没知道解决办法,不知道为什么。。

xdebug 一直报错 upstream timed out (110: Connection timed out) while reading response header from upstream

标签:

原文地址:http://www.cnblogs.com/maxomnis/p/5591638.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!