hashicorp / hashicorp/consul

agent/cache: stop refreshing a cache entry after some number of failed attempts

Open
#9,588 1 comment 2 reactions 0 assignees View on GitHub
theme/agent-cache type/bug
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

Related to #8541 (and other issues I can't find right now).

We've had a few reports of the logs being filled with errors caused by the background refresh of agent/cache entries. The agent/cache has a TTL of 72 hours. So when something is removed it can produce a lot of logging noise for days. This problem can also cause the agent to OOM. If many requests for non-existent data are made, then we start a goroutine for each. Eventually all those goroutine can OOM the agent.

Instead of attempting to refreshing the entry for 72 hours , and getting an error every time, we should stop refreshing after either some number of attempts, or after some period of time without a success.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.