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

本地主机(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环境了。

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

转载于:https://www.cnblogs.com/maxomnis/p/5591638.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值