... and so on. In my case, a service was attempting to reconnect to RabbitMQ periodically after the connection was severed, and kept failing for a long time. This eventually exhausted the fd limit, making the service unable to function.
This happens when SocketTransport.connect fails to connect (specificallt, when a socket.error is closed), and the loop continues to the next iteration. In that case, the socket is never closed, and the connection is left half-closed.
These connections do not show up in netstat (on Linux). You can detect them with lsof, where they appear as "can't identify protocol".
... and so on. In my case, a service was attempting to reconnect to RabbitMQ periodically after the connection was severed, and kept failing for a long time. This eventually exhausted the fd limit, making the service unable to function.
This happens when SocketTransport.connect fails to connect (specificallt, when a socket.error is closed), and the loop
continue
s to the next iteration. In that case, the socket is neverclose
d, and the connection is left half-closed.These connections do not show up in netstat (on Linux). You can detect them with lsof, where they appear as "can't identify protocol".
Fixed in PR #96.