Skip to content
New issue

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

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

Already on GitHub? # to your account

Better errors when reloading #6601

Merged
merged 3 commits into from
Oct 2, 2024
Merged

Better errors when reloading #6601

merged 3 commits into from
Oct 2, 2024

Conversation

mholt
Copy link
Member

@mholt mholt commented Oct 2, 2024

This helped a sponsor in troubleshooting an issue with config reloads. With a lot of domain names, the error message got truncated, making it impossible to read the actual error.

This patch limits how many domain names appear in the log/error messages, and in one case we just replace the list of names with the number, since the log emitted just above emits the names.

Part of the problem was also that we only read the first 10 KB of the error, which is totally plenty 99.99% of the time, but when there's lots of domain names, they can run the error past that size, so I increased the limit to 2 MB. This is a HUGE limit, but the idea is to prevent a faulty backend from flooding the client with a huge garbage response accidentally. I think I meant for the limit to be 100 KB or 1 MB, not 10 KB. Oh well.

Verified to have helped troubleshoot a production issue.

@mholt mholt merged commit c8adb1b into master Oct 2, 2024
33 checks passed
@mholt mholt deleted the reload-troubleshooting branch October 2, 2024 02:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant