Search code examples
linuxsocketstcp

TCP send queue getting stuck


In a scenario when there is a delay in network, even ACKs are getting delayed by about 32 mili seconds, TCP send buffer is getting full and its not clearing even after 5-10 min.

what can be issue here? Is there any way that I can check current TCP send buffer status, so that I can stop outgoing traffic if buffer is getting full? Any TCP config I should take care off?

Its happening in openldap2.4 stack. Thanks in advance.


Solution

  • Is there any way that I can check current TCP send buffer status, so that I can stop outgoing traffic if buffer is getting full?

    It will automatically stop sending if the send buffer is full: If the send buffer is full a send/write will either block (blocking socket) or fail (non-blocking socket). If you want to stop earlier just decrease the buffer with setsockopt(..., SO_SNDBUF,...) – Steffen Ullrich