TCP connections from GitLab processes accumulate and do not close after upgrade to 17.11
After upgrading from GitLab EE 17.4 to 17.11, we started experiencing a steady increase in the number of open TCP connections from GitLab to external services.
This is most visible on connections to our external Elasticsearch cluster, where the number of connections grows over time and is not released unless we restart GitLab components (such as Sidekiq) or Elasticsearch itself.
Eventually, this leads to socket resource exhaustion, degraded performance, and the need for manual intervention.
Environment: GitLab version: 17.11.4-ee
Integration: Advanced Search enabled (external Elasticsearch 8.13.0)
Observed: Mostly in Sidekiq and other Ruby processes
OS: Ubuntu 22.04 LTS
Observations:
Connections increase over time and are not released.
Most visible in long-lived services (e.g. Sidekiq).
Restarting GitLab services or Elasticsearch reduces the connection count temporarily.
Appears to correlate with Advanced Search / Elasticsearch indexing traffic, but may affect other services as well.
We did not observe this behavior before upgrading to 17.11.
Questions:
Has there been a recent change in how GitLab manages outgoing HTTP/TCP connections?
Could bulk indexing concurrency or client reuse be involved?
Is there a safe way to force cleanup of unused connections from within GitLab without full restarts?
Any known issues or improvements coming in GitLab 18.x related to this?