Is there a way to get a disconnect event for a bucket?


#1

Is there a way to know when a bucket connection has actually ended?

I have been debugging an issue with a few of our applications and the event loop is being kept alive.

Thanks!


#2

Hey @evanlucas,
Due to the persistent nature of Couchbase connections, it is necessary to call the .shutdown() method on a bucket once you are finished performing operations on it. This will shut down all the connections and free up the event loop. There are no events that are dispatched when this occurs as it is always initiated explicitly by the application.
Cheers, Brett


#3

@brett19 thanks for the response. We are running into an issue where the event loop is being kept alive after calling disconnect() on the bucket. There are also (rare) cases where the process will abort. I am still trying to get a reproducible test case for yall for that though. I haven’t quite identified the cause. Thanks!