Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix retry logic to avoid stuck in loop #16

Merged
merged 1 commit into from
May 10, 2023

Conversation

zq-david-wang
Copy link
Contributor

Fix a silly mistake in tail.go
The retry countdown do help keep promtail from stuck in loop, causing promtail stop read logs.

Related issue: grafana/loki#3985

@CLAassistant
Copy link

CLAassistant commented Dec 21, 2022

CLA assistant check
All committers have signed the CLA.

@tareks
Copy link

tareks commented Apr 7, 2023

Any chance this may get reviewed and merged?

@acmayberry
Copy link

What is the reason for delay on this? It is a really awful bug. The loop counter for retries is being reset inside the loop creating an infinite loop which completely runs away with memory and CPU. This seems to happen on any logs that get rotated like istio logs for instance. I feel like "silly" is a pretty big understatement.

@MariusBrill
Copy link

@MasslessParticle is there a chance that you or a colleague of yours can have a look at this pr? Looks like a low hanging fruit that, at least in my case, causes major issues with the loki stack.

@MasslessParticle
Copy link
Contributor

Thanks for the contribution!

@amseager
Copy link

@MasslessParticle Will it be propagated to grafana-agent? I'm facing this issue there.

MichelHollands pushed a commit to grafana/loki that referenced this pull request Jul 12, 2023
**What this PR does / why we need it**:
This bumps the grafana/tail version used, mostly to address an issue
with the retry logic (grafana/tail#16)

**Which issue(s) this PR fixes**:
Fixes #9864 #9877 #9869, maybe others

**Special notes for your reviewer**:
I did NOT add a note about this dependency bump in the changelog. Let me
know if you want me to add that ... or kindly add that line yourself.

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants