title: TCP window size got stuck
body: <p>We are using an ARM system to run our application. We copy lots of data through the network. The system is running Ubuntu built from sources.</p>
  
  <p>Once in a while the app gets stuck with low throughput. By looking at the tcpdump output, we noticed, that the receiver eventually advertises a really small tcp window size, 500-700 bytes only. When we hit this issue, the size does not change at all. What we do in the code, just call read_some() on socket wrapper from boost asio (1.58 version).</p>
  
  <p>Every time we get the same number of bytes from socket (equal to tcp window size). We tried multiple things and we still don't understand, what is going on. Looks like the kernel has an unusual behavior. When it happens, I output the number of bytes ready to read from the socket, and it is zero. I.e. the receiver's buffer is totally empty, but the advertised size is still very small.</p>
  
  <p>The worst thing is, we don't know how to reproduce it quickly. One day it is failing quite well, another it is not failing at all. We are stuck.</p>
  
  <p>Could you please give us an idea where to look at? Can we debug the kernel related to setting tcp window somehow?</p>