hashicorp / hashicorp/vault-plugin-database-elasticsearch
BUG:net/http.(*persistConn) goroutine leak
- Dominant language
- Go
- Stars
- 31
- Forks
- 8
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 2
Description
Grafana dashboards indicate a continuous increase in the Goroutine count within the Vault service.
A subsequent pprof analysis revealed a significant number of persistent HTTP connections that are not being closed.
These connections all originate from and are directed towards Elasticsearch.
The [buildClient function](https://github.com/hashicorp/vault-plugin-database-elasticsearch/blob/main/elasticsearch.go#L286) is used for all Elasticsearch calls, but its connection pool is only configured with TLSClientConfig.
Vault Version:1.14
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the buildClient function in elasticsearch.go at line 286 and inspect how its HTTP connection pool is configured for Elasticsearch calls. Use the reported Grafana goroutine increase and pprof findings as the reproduction signals. Done means persistent HTTP connections no longer accumulate during Vault's Elasticsearch activity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, go
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100