Answer the question
In order to leave comments, you need to log in
Why is data in a tcp frame split into 2 tcp segments and the second segment is lost?
Greetings.
We send JSON from 1Сv8 to nginx (proxies to unicorn backend) via POST request.
Some of the requests are received normally, but some receive a 400 response from nginx. We turned on the logging of the request body and saw that the JSON does not arrive completely - part of the request is cut off at the end.
I looked at the traffic with wireshark and found out that these requests consist of 9 Reassembled TCP Segments. Moreover, only in problem requests I see 2 TCP segment data. And just this second segment is cut off for some reason.
1. Why can it be split into 2 TCP segment data?
2. Why does this segment not get into the reassembled tcp?
Thank you.
Answer the question
In order to leave comments, you need to log in
I think that TCP has nothing to do with it, unless the client closes the connection without reading the server's response, then this is possible if there is no linger installed on the socket. But most likely, this is just a bug in the client, the developers did not take into account that the send () function can not send all the data from the buffer, developers with no experience in writing network clients make such a mistake quite often.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question