Docker Compose Networking Issue: TCP Request Stops Sending

Ubuntu 18.04
Docker version 20.10.17, build 100c701
Docker Compose version v2.6.0

We have an integration test that creates a few Docker compose containers that communicate with one another over the network. One of the containers must send a 187575 byte message via TCP to another container. This is a large message, but we’ve never seen it fail outside of Docker. Sending this large message sometimes fails to be received in full. tcpdump shows that the sender just stops sending packets. We find that when it does fail, the receiver always receives exactly 147456 bytes out of the full message.

In an attempt to debug, we run the service that sends the large message outside of Docker and find that it always succeeds, the message is sent and received successfully, even when all of the other services are running in Docker containers. This indicates that the issue is specifically on the sending side Docker container.

The code and behavior here is completely different and unrelated to the similar issue I opened here. The server and clients are written in entirely different programming languages and their function is unrelated. Message throughput is very low, just a few dozen messages total.

I do not have a minimal reproducing example to share here, but would appreciate any pointers on why this behavior would exhibit solely in Docker and how we might debug it.