K
K
konstaner2016-06-27 13:35:00
Computer networks
konstaner, 2016-06-27 13:35:00

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.
b5104f3b2bda40df9aee7dfbc4b006ca.png
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

1 answer(s)
V
Vladimir Dubrovin, 2016-06-27
@z3apa3a

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 question

Ask a Question

731 491 924 answers to any question