HTTP request does not reach the server occasionally. Why?
We host our web-service on a dedicated server. Sometimes (I'd say 1 out of 20) a response is not received from the server. That makes the browser fallback with time-out error.
An important detail: the request is not logged by Apache in this case.
There is no load on Apache, there are a lot of free memory and CPU power left.
[UPDATE] I have profiled the problem case with tcpdump utility. These are the good and bad sessions traced by tcpdump. The request is the same in both experiments. Good - server returns response. Bad - no response, time-out error.
Do you see why the problem happens from these data? How can I move further to get closer to the source of the error?
I've replaced my real ip address with 123.45.67.890
---- Bad ----
12:23:36.366292 IP 123.45.67.890.61749 > myserver.superbservers.com.www: S 2125316338:2125316338(0) win 8192 <mss 1460,nop,wscale 2,nop,nop,sackOK>
12:23:39.362394 IP 123.45.67.890.61749 > myserver.superbservers.com.www: S 2125316338:2125316338(0) win 8192 <mss 1460,nop,wscale 2,nop,nop,sackOK>
12:23:45.365567 IP 123.45.67.890.61749 > myserver.superbservers.com.www: S 2125316338:2125316338(0) win 8192 <mss 1460,nop,nop,sackOK>
--------
---- Good ----
12:27:07.632229 IP 123.45.67.890.63914 > myserver.superbservers.com.www: S 3581365570:3581365570(0) win 8192 <mss 1460,nop,wscale 2,nop,nop,sackOK>
12:27:10.620946 IP 123.45.67.890.63914 > myserver.superbservers.com.www: S 3581365570:3581365570(0) win 8192 <mss 1460,nop,wscale 2,nop,nop,sackOK>
12:27:10.620969 IP myserver.superbservers.com.www > 123.45.67.890.63914: S 2654770980:2654770980(0) ack 35813655开发者_如何学C71 win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 6>
12:27:10.838747 IP 123.45.67.890.63914 > myserver.superbservers.com.www: . ack 1 win 4380
12:27:10.957143 IP 123.45.67.890.63914 > myserver.superbservers.com.www: P 1:213(212) ack 1 win 4380
12:27:10.957152 IP myserver.superbservers.com.www > 123.45.67.890.63914: . ack 213 win 108
12:27:10.965543 IP myserver.superbservers.com.www > 123.45.67.890.63914: P 1:630(629) ack 213 win 108
12:27:10.965621 IP myserver.superbservers.com.www > 123.45.67.890.63914: F 630:630(0) ack 213 win 108
12:27:11.183540 IP 123.45.67.890.63914 > myserver.superbservers.com.www: . ack 631 win 4222
12:27:11.185657 IP 123.45.67.890.63914 > myserver.superbservers.com.www: F 213:213(0) ack 631 win 4222
12:27:11.185663 IP myserver.superbservers.com.www > 123.45.67.890.63914: . ack 214 win 108
--------
Hosting: SuperbHosting OS: Ubuntu
I don't think this is the kind of question you ask on SO or any other forum - you should ask that question to yourself first.
I would suggest running a bunch of tests: 1) simple ping over a longer amount of time 2) run sniffer on your pc and on the server - look at what's going on there.
Depending on the results you may try some other things.
Packets are getting dropped somewhere along the path. The Internet is one very large network and each link is a potential point where packets can get dropped. The tcpdump does not tell you anything except that there is no response coming back from the server.
You can try traceroute on UNIX or tracert on Windows to possibly find a routing issue. You can also try using a hosted tool like http://network-tools.com/ to see if it has the same packet drops. If it doesn't then this would point to your source network is the problem, not the network your web server is at.
I would say this is a case where you need to contact your hosting provider. They will most likely ask you for a traceroute to get started but they should should be able to help you further.
As hwatkins points out, it's definitely a networking issue. Unfortunately "networking issue" could mean the TCP/IP stack inside your server host, the link between your server and Internet, or some other backbone component somewhere.
This is a classic case of "you need to call the cavalry". : )
Hope this helps.
精彩评论