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

Massive amounts of 429 errors in the log #957

Closed
d-Rickyy-b opened this issue Jul 24, 2022 · 3 comments · Fixed by #963
Closed

Massive amounts of 429 errors in the log #957

d-Rickyy-b opened this issue Jul 24, 2022 · 3 comments · Fixed by #963

Comments

@d-Rickyy-b
Copy link

Hi there,

when I run my certificate monitoring service for a few minutes, I start receiving massive amounts of http 429 errors. According to #746, a backoff mechanism has been implemented already. What else can I do to avoid 1) massive 429 errors and 2) the spam in my logs.

grafik

Cheers,
Rico

@mhutchinson
Copy link
Contributor

There are a number of options you could try. The first is reducing the number of parallel workers. Otherwise, changing code in your version of scanner/fetcher.go to tune your experience opens more options. In runWorker:

  • Changing the parameters for the backoff.Backoff; I'd recommend increasing the Min to a larger number, and increasing the Factor should also make the backoffs longer
  • Removing the glog.Errorf on line 287, or downgrading it to glog.V(1).Infof so you still have the option of seeing the errors

@d-Rickyy-b
Copy link
Author

Hi @mhutchinson and thanks for your reply!

If I understood you correctly, both of these options require me to change the code of this module, right?
I'm using certificate-transparency-go as a dependency and am using the JSONClient. The backoff attribute is private and can't be manipulated from the outside. The code in runWorker is also private and can't be modified.

return &JSONClient{
uri: strings.TrimRight(uri, "/"),
httpClient: hc,
Verifier: verifier,
logger: logger,
backoff: &backoff{},
userAgent: opts.UserAgent,
}, nil

Is there any way for me as a user to solve (or circumvent) the issue?

mhutchinson added a commit to mhutchinson/certificate-transparency-go that referenced this issue Aug 1, 2022
These are expected when a client is riding the limit of what the log will allow, so there's no need to fill the log up with these messages. Still having them logged does allow users to provide flags to output them to make sure there aren't way more than reasonable.

This fixes google#957.
mhutchinson added a commit that referenced this issue Aug 1, 2022
These are expected when a client is riding the limit of what the log will allow, so there's no need to fill the log up with these messages. Still having them logged does allow users to provide flags to output them to make sure there aren't way more than reasonable.

This fixes #957.
@mhutchinson
Copy link
Contributor

The PR I've just merged will downgrade these 429 errors to info messages at verbosity level 2. If you don't override the --v argument that configures glog then you won't see this if you use a build that includes my change.

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 a pull request may close this issue.

2 participants