Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Ben BrooksBen BrooksReporter
Ben BrooksBen BrooksLabels
Story Points
5Components
Sprint
NoneFix versions
Affects versions
Priority
CriticalInstabug
Open Instabug
Details
Details
Assignee
Ben Brooks
Ben BrooksReporter
Ben Brooks
Ben BrooksLabels
Story Points
5
Components
Sprint
None
Fix versions
Affects versions
Priority
Instabug
Open Instabug
PagerDuty
PagerDuty
PagerDuty
Sentry
Sentry
Sentry
Zendesk Support
Zendesk Support
Zendesk Support
Created October 1, 2020 at 12:55 PM
Updated August 31, 2024 at 11:01 AM
Resolved October 21, 2020 at 9:36 PM
Issuing a websocket-based changes feed and disconnecting causes the "SimpleMultiChangesFeed" goroutine to leak, even after the websocket request has timed out due to the 5 minute heartbeat.
With enough clients over a long enough period, this can result in a leak of a significant amount of memory and can cause OOMs.
This seems to have been the case since at least CBL 1.5.3, and is mostly caused by CBL 1.x clients, which use the websocket changes API. CBL 2.x uses a different API, and so does not cause this issue.
Next steps before fix:
Evaluate whether a "clean" disconnect still causes this.
Repro'd with websocket command line tool and ^C to close the request, which is an "unclean" disconnect, which relies on the 5 minute heartbeat to actually timeout the request.