Warren
Error

client unexpectedly closed TCP connection (connection_closed_abruptly): who closed the RabbitMQ connection

2026-11-13 · 3 min read · Viktor Baumann

closing AMQP connection <0.3846.0> (192.168.65.1:60870 -> 172.17.0.7:5672 - billing-kill, vhost: 'orders', user: 'app', duration: '2s'):
client unexpectedly closed TCP connection

The TCP connection ended without the AMQP connection.close handshake. Inside the broker the reason is called connection_closed_abruptly (that is the name people search for); the log prints it as client unexpectedly closed TCP connection, at warning level. RabbitMQ 3.7.28, 3.8.34, 3.13.7 and 4.3.6 all wrote the same line. It says the client side went away, not why. Measured on 4.3.6 with pika 1.4.4:

What happenedBroker log
client process killed (kill -9)client unexpectedly closed TCP connection
a proxy with a 10-second idle timeout between client and broker, heartbeat 60 sclient unexpectedly closed TCP connection, after 10 s
the same proxy, heartbeat 4 snothing: the connection was still open after 30 s
client blocked in a 40-second job, heartbeat 5 smissed heartbeats from client, timeout: 5s (error level)
plain TCP connect and close, as a TCP health check doesnothing at all

Telling the causes apart

Give every connection a name (connection_name in pika's client properties; most clients have a setting for it). The log line then shows which application it was, as billing-kill above.

The fix