My guess is that it is Jira - calling /{db}/_offline will block until all HTTP connections have been terminated.
Until Jira was addressed, this also included all Couchbase Lite continuous replications.
However, the behavior of blocking until all HTTP requests are finished might not be desired anyway - it is blocked behind a read-write mutex, and is not a draining operation. If frequent HTTP requests were occurring, it would be possible that /{db}/_offline would not acquire the write part mutex. All other requests will acquire the read mutex.
Changing the db config to offline will have the the effect of immediately terminating the connections and turning the database into offline mode. As I said before, we are likely to leave the behavior of /{db}/_offline as is, with all the flaws, since using /{db}/_config with {“offline": true}is the only thing that works with a multi node Sync Gateway cluster.