My web-services server sometimes does not receive correct HTTP requests and returns "500 - Internal Server Error". Using
tcpdump and Wireshark on the server, I found out that HTTP requests are splitted into 2 TCP packets, and that sometimes, the server tries to process the request before the second packet could arrive.
This wireshark capture has been taken on the server side.
So what I see is that :
- The first fragment of the HTTP request is received at
- It is received again at
- The second (and last) fragment of the request is received at
99.869(that is 45 seconds after the first one)
- Four millisecond before, at
99.865, the server kind of timed-out and tried to process an incomplete request (which gives a 500 Error)
I don't know where to look now. I would say that it is a network issue but I have several TCP streams where the server tries to process the request several milliseconds before it is completely received. On the other hand, TCP paquets that takes 45+ seconds to arrive means that the network is really bad.
Do you have any pointers on how to investigate more ?