Open alexp-openai opened 5 months ago
Thank you for opening this issue, we will look into it.
Any updates?
Also looking for updates here
@yonzhan
Python SDK also throws same 431 error
Hi, are there any updates on this issue?
Created support request #2407240010005397 in Azure Portal.
@alexp-openai I opened a request too a few days ago. Being tossed around internally at MSFT and am getting updates every 2 days but no real update. Got on a call with an engineer at one point, and it worked fine for them but not me, but referred them here to show it's not just me. We shall see who wins the support race.... Can we agree to update each other here? 😉
Just to add context, we do have several hundreds of subscriptions visible for each user. Maybe that affects the size of authentication header.
But we specify the subscription / scope in the call, no? Even in the try it now portion of https://learn.microsoft.com/en-us/rest/api/reserved-vm-instances/quota/update?view=rest-reserved-vm-instances-2022-11-01&tabs=HTTP#code-try-0 it's denied.
Would be surprised if # subs affected request headers, but then again... maybe not. Also possible there was an update to token length or something by a diff team outside of the team that works on the quota api and they're not aware.
@sima-zhu @xiangyan99
We found out that users on our team has very large access tokens in ~/.azure/msal_token_cache.json file. One of them is 10109 bytes long.
@alexp-openai What was your resolution?
@rahuls-microsoft, could you please help take a look as it seems the error is from server side? Both CLI and SDK return the same error.
@zhenlan saw you helped resolve similar issue under https://github.com/Azure/AppConfiguration/issues/233. Not sure if you can be of assistance here as well?
@ajhous44 , I haven't found a working solution that can be use from CLI or API. As a workaround, I edit quotas manually through Azure Portal UI.
We found that the user who using the API had membership to multiple groups (164) and which were included in the header, which caused the issue header too big. I would recommend using an APID, which has Limited/Required Group Membership not to all the Groups. I think, it was temporary test by a User, that's why you got this error.
@rahuls-microsoft , thanks for looking into this and suggesting the workaround! I am indeed a member of many groups, but they are used for different purposes, so such large number of groups is not an accidental mistake.
Is it possible to increase header limit for the quota API to a larger value? I think I was able to use other az cli command successfully. Quota increments through the Azure Portal UI also completes successfully, despite sending a very large authentication token there as well(we used Chrome developer tools to see the headers being sent to quota API from the browser)
Also worth noting: I have a colleague for whom the quota update does work, and he's in more groups than I am. So it seems like the number of groups might not be strictly the issue?
As Per Logs the error is - 431 Request Header Fields Too Large The current Limit is already 32K. Quota RP requests Group Information to get the user's group membership to validate certain scenarios, which is provided by ARM. Other RPs may not need it, so they won't get impacted. The header is the Sum of all the header fields, so it might cross the limit in some cases. It seems like it's just on the boundary limits, so it works with portal and not with Az. Can you try Curl or PowerShell, just to validate, if Az has any special headers, which is crossing the header size Limit of 32K. As you mentioned that it works through portal, so there might be some extra headers added by as client, which might be hitting the limit. Meanwhile I will look into a resolution, but that would take time to implement and deploy, if possible. Let's find a working solution to unblock you and work to increase the header limits, if possible. Thanks for your help in investigating the issue.
Describe the bug
I'm running a quota update command from the cli, like this:
And I'm getting an error message "Operation returned an invalid status 'Request Header Fields Too Large'".
I tried running it with --debug flag, and all of the HTTP headers look normal-size. The authorization header is hidden, so maybe it is too long.
Other az commands, like az quota list, work fine.
Related command
az quota update
Errors
Operation returned an invalid status 'Request Header Fields Too Large'
Issue script & Debug output
Expected behavior
the command should work without error
Environment Summary
Additional context
No response