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

[BUG]: After about 5 hours of running, octokit starts returning 400 Request Header Or Cookie Too Large #2980

Open
1 task done
adegeo opened this issue Oct 28, 2024 · 6 comments
Labels
Type: Bug Something isn't working as documented

Comments

@adegeo
Copy link

adegeo commented Oct 28, 2024

What happened?

I'm not sure what to do about this. My azure function starts returning this error after about 5 hours of running. I get this when calling CreateInstallationToken on the github client object. If I restart the app, everything starts working fine. I can reproduce this locally, it just takes 5 hours of running before it shows up.

Versions

Octokit.NET 13.0.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@adegeo adegeo added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Oct 28, 2024
@nickfloyd nickfloyd moved this from 🆕 Triage to 🏗 In progress in 🧰 Octokit Active Nov 1, 2024
@nickfloyd
Copy link
Contributor

Hey @adegeo thanks for reaching out and apologies for the trouble.

This feels like you might be hitting a server side limitation and should probably consider implementing rate limit handling and incremental back offs. It also feels like the azure might be recursively storing and/or resending header data but without actually seeing the code it would be hard to say.

Would you happen to be able to share the source of the function or describe what it does and how it uses this SDK? If it's an internal repo feel free to reach out to me on teams.

And an aside we've been working on generative SDKs and we've implemented some fairly elegant rate limiting / automatic retry logic in those SDKs if you'd be interested in trying that as an alternative to our much older implementation.

I look forward to hearing from you.

@nickfloyd nickfloyd removed the Status: Triage This is being looked at and prioritized label Nov 1, 2024
@adegeo
Copy link
Author

adegeo commented Nov 5, 2024

@nickfloyd Hi! Thanks for getting back to me. I pinged you on Teams.

@adegeo
Copy link
Author

adegeo commented Nov 6, 2024

The Azure Function's code is on GitHub here: docs-tools/RepoMan at adegeo-repoman2 · dotnet/docs-tools (github.com)

The token request happens here: docs-tools/RepoMan/GitHubAccess.cs at adegeo-repoman2 · dotnet/docs-tools and then with GitHubJwt NuGet package.

@nickfloyd
Copy link
Contributor

Hey @adegeo I have not been able to make any progress on this. We're quite a bit short handed this week - hopefully I'll be able to give it the time it needs tomorrow.

@adegeo
Copy link
Author

adegeo commented Nov 14, 2024

OK Thanks! It occurred to me that I could setup a runbook in azure that just reboots my function every few hours to at least keep it running normally.

Should I be looking at using that other SDK you linked to?

@nickfloyd
Copy link
Contributor

OK Thanks! It occurred to me that I could setup a runbook in azure that just reboots my function every few hours to at least keep it running normally.

That would be ideal. We just had a few priorities reshuffle on us and I'm not going to be able to get to this in the near term - apologies for the side track.

Should I be looking at using that other SDK you linked to?

You should definitely give it a try if you have time - it has much more updated patterns and API coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants