Unsolicited response received on idle HTTP channel starting with "[]\n"; err=<nil>
来源:互联网 发布:人工智能产业高峰论坛 编辑:程序博客网 时间:2024/06/08 16:53
最近在用 golang 开发一个项目, 项目用的是 iris 这个web框架。
我们的这个项目是用golang 实现的ADX (AD EXCHNAGE), 说白了就是一个广告的开关,
说白了就是移动端请求ADX,ADX 再去请求第三方广告平台(简称DSP),然后把广告信息返回给移动端进行展示。
最近测试服务器报出一个诡异的的日志打印,服务器没处理一个请求都会打印这个日志,日志如下:
2016/11/23 03:35:17 Unsolicited response received on idle HTTP channel starting with "[]\n"; err=<nil>
这个日志打印是 net/http/transport.go, 代码如下:
找到了打印日志的地方,是什么原因导致的这个问题,还是不清楚。最后google 上的一篇文章,解释了这个问题的根源。
原文地址:https://codereview.appspot.com/86740044
以下引用原文:
中文大致意思是: 后台服务器如果处理慢,导致代理(nginx 等)认为超时,代理把这个连接关闭,正好这个时候,后台server 的响应已经发出,
这时候 net/http/transport.go 就会检查到这个响应,并认为是不可预期的,从而打印这个日志。
Github 上有 demo 可以复现这个问题,有兴趣继续研究的同学,可以访问:https://gist.github.com/cespare/f4352a11bac5cced9458。
问题定位到这里,解决办法就两种,要么加快后端server的处理速度,要么调整代理的超时时间。
- Unsolicited response received on idle HTTP channel starting with "[]\n"; err=<nil>
- Texas Instruments X-Loader 1.41 Starting on with MMC
- 非idle界面received SMS提示
- SharePoint Error - An unrecognized HTTP response was received when attempting to crawl this item
- 安卓APP无法显示admob谷歌广告,显示Received error HTTP response code: 400
- laravel 5.4 redis 报错 'Predis\Response\ServerException' with message 'ERR unknown command 'EVAL'' 201
- br-lan: received packet on eth2.1 with own address as source address
- debugging python with IDLE
- mvn tomcat:run启动tomcat插件一直停在Starting Coyote HTTP/1.1 on http-8080
- asterisk呼叫handle_response_invite: Received response: "Forbidden" 问题
- The server failed to respond with a valid HTTP response
- Starting Out with Python
- Starting with Algorithms(Part2)
- Starting with GDI+
- Get starting with RMAN
- preSend on channel 'errorChannel'
- 虚拟机下3070网卡 no ap with wpa found on channel all
- N - Channel Allocation
- Kotlin-数据类
- Xml与Java对象之间的解析转换
- Scala 基础总结
- Mac下安装svn并且检出项目
- Github Reset
- Unsolicited response received on idle HTTP channel starting with "[]\n"; err=<nil>
- 位段与联合,枚举类型
- Android打开各种类型的文件方法总结
- NetWork——描述一次完整的网络请求过程
- Js获取图片的真实大小
- Percona监控工具初探
- android 混淆配置 实例实战项目讲解
- libgdx之瓦片地图(TiledMap)
- x86反汇编练习-20161120