说明一下,访问 php 文件会出现,访问图片也会出现
在 Firefox 、 IE 下很明显
Ctrl+F5 刷新基本上都会出现,导致用户体验非常差
如:
http://www.seowhy.com/uploads/course/20160307/64_450_280.jpg
http://www.seowhy.com/
1
ershisi 2016-03-14 17:10:52 +08:00 1
看看你的 mysql 连接时间最大是多少, nginx 的最大连接时长是多少。
|
3
shiji 2016-03-14 17:25:39 +08:00 1
我这里 Chromel 里面现实一部分的资源 ERR_CONTENT_LENGTH_MISMATCH ,也就是说,文件的实际大小和 HTTP 服务器返回的大小数据不一致,比如 http://cdn.seowhy.com/adimages/xiaoniao_20160229_3.gif 和 http://www.seowhy.com/uploads/course/20160121/51_450_280.jpg 。你用了反代了吗?
这个 51_450_280.jpg 服务器返回的大小是 136571 ,实际能下载下来的大小只有 34171 ,图片只能显示上面的一小段。 |
4
Strikeactor 2016-03-14 17:26:28 +08:00 1
curl -v 'http://www.seowhy.com/uploads/course/20160307/64_450_280.jpg'
* Trying 59.46.80.34... * Connected to www.seowhy.com (59.46.80.34) port 80 (#0) > GET /uploads/course/20160307/64_450_280.jpg HTTP/1.1 > Host: www.seowhy.com > User-Agent: curl/7.43.0 > Accept: */* > * Recv failure: Connection reset by peer * Closing connection 0 curl: (56) Recv failure: Connection reset by peer 刚发完请求就被掐了,感觉是 Nginx 的问题 |
5
ToughGuy 2016-03-14 17:26:47 +08:00 1
和 mysql 没关系, nginx 后面的问题都能返回 http 错误码。
1. 检查服务器防火墙有没有问题 2. 使用默认 nginx 配置试试 |
7
fesiong OP |
8
fesiong OP 感谢,我再配置一下 nginx 试一下
|
9
ToughGuy 2016-03-14 17:34:08 +08:00
```
err=0; for _ in {1..100}; do curl -q --connect-timeout 1 --header 'Host: www.seowhy.com' http://127.0.0.1/uploads/course/20160307/64_450_280.jpg >/dev/null 2>&1 || ((err++)); done; echo $err ``` 在服务器上面通过 127.0.0.1 请求资源看会不会出现错误。 |
10
fesiong OP |
12
Strikeactor 2016-03-14 17:39:28 +08:00
@fesiong 所有连接都时不时断?防火墙关了先,还这样的话你打电话问问机房是不是在维护吧。。
|
13
ToughGuy 2016-03-14 17:41:32 +08:00 1
@fesiong
这样的话可以排除掉 nginx 问题了。 1. 检查防火墙 iptables -L -n -v dmesg 2. 有没有动过服务器默认网络相关的内核参数 /etc/sysctl.conf 3. 检查网卡 errors, dropped, frame 这几个项目值是不是 0 , 不为 0 说明网卡或者网线可能存在问题。 ifconfig |
14
fesiong OP |
15
zaishanfeng 2016-03-14 18:04:17 +08:00 via Android
可能是 isp 的问题 我们伟大的墙就经常玩这招
|
16
ershisi 2016-03-14 20:30:14 +08:00
[除了访问网页,链接 ssh 、远程 mysql ,也老是被断开,这个又会是什么原因呢] 网关问题吧。
|
17
blackboar 2016-03-14 22:00:47 +08:00
让托管商排查下机房防火墙,可能有 web 防护。
|
18
techmoe 2016-03-15 05:54:03 +08:00 via Android
如果服务器在国外可能是被墙了
|
20
kungfuchicken 2016-03-15 10:09:32 +08:00
MTR 测试显示 202.97.81.234 中国辽宁沈阳 电信 主干掉包率高达 40%,应该是这个引起的
|
21
kungfuchicken 2016-03-15 10:10:14 +08:00
|------------------------------------------------------------------------------------------|
| WinMTR statistics | | Host - % | Sent | Recv | Best | Avrg | Wrst | Last | |------------------------------------------------|------|------|------|------|------|------| | 192.168.24.129 - 0 | 125 | 125 | 3 | 12 | 617 | 4 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | |129.155.183.61.dial.wh.hb.dynamic.163data.com.cn - 0 | 125 | 125 | 0 | 2 | 113 | 1 | | **** - 0 | 125 | 125 | 1 | 3 | 5 | 1 | | **** - 0 | 125 | 125 | 1 | 3 | 5 | 2 | | 202.97.36.202 - 0 | 125 | 125 | 21 | 22 | 26 | 21 | | 202.97.81.234 - 38 | 48 | 30 | 0 | 41 | 43 | 41 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | 219.148.224.50 - 2 | 117 | 115 | 43 | 46 | 55 | 44 | | 219.148.224.66 - 0 | 125 | 125 | 40 | 40 | 48 | 40 | |126.23.44.59.broad.sy.ln.dynamic.163data.com.cn - 0 | 125 | 125 | 47 | 47 | 47 | 47 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | | No response from host - 100 | 24 | 0 | 0 | 0 | 0 | 0 | |________________________________________________|______|______|______|______|______|______| WinMTR v0.92 GPL V2 by Appnor MSP - Fully Managed Hosting & Cloud Provider |
22
realpg 2016-03-15 10:44:46 +08:00
看了下 IP ,只能说楼主你换个有网管的服务商吧,哪怕网吧网管级别的……
|