I have a Couchbase Server setup in Microsoft’s Azure cloud and I’m finding that over long periods of inactivity (around 8 minutes), my application can no longer communicate with the Couchbase server. My assumption is that Azure is killing idle connections, but from my understanding the client supports KeepAlive packets on the data ports (11210, etc).
However, I don’t see any KeepAlive packets being sent when inspecting network traffic from WireShark. Additionally when I add logging to the application, all I see is the 10 second default timeout killing the connection after it fails.
My question is, are the KeepAlive packets really being sent and what is the proper way to handle a disconnect/socket termination? I understand there’s 10 sockets by default, but what happens over the course of the application when those slowly become dead?
Here’s a link to my WireShark snippet that shows no activity between 11 seconds and 491 seconds into the capture when the next request actually fails. IP’s have been renamed to protect the innocent. 184.108.40.206 is my client and 220.127.116.11 is the Couchbase server.
Here’s the log4net logger that occurs during this same time showing one initial successful request and another request 8 minutes later that fails. Note that I do have the heartbeat monitor disabled as it doesn’t seem to do anything on the data sockets and turning it off made the logging less noisy.