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

Downloading stash for Standard - see debug info #1158

Open
OldGothith opened this issue Nov 27, 2023 · 8 comments
Open

Downloading stash for Standard - see debug info #1158

OldGothith opened this issue Nov 27, 2023 · 8 comments
Assignees
Labels

Comments

@OldGothith
Copy link

OldGothith commented Nov 27, 2023

Using Procurement 1.30.1
After loading 31 stash tabs I receive an error below for, "The remote server returned an error: (429) Too Many Requests"?
There has not been any throttle while loading the 31 stash tabs.
Attaching full DebugInfo.log at bottom.

Preview of the error:
[26-11-2023 19:57] Failed to build HTTP request and get response for: method=GET, url='https://www.pathofexile.com/character-window/get-stash-items?league=Standard&tabs=1&tabIndex=30&accountName=Gothith&realm=pc', allowAutoRedirects=, requestData='': The remote server returned an error: (429) Too Many Requests.
[26-11-2023 19:57] Error downloading stash for Standard, exception details: System.Net.WebException: The remote server returned an error: (429) Too Many Requests.
at System.Net.HttpWebRequest.GetResponse()
at POEApi.Transport.HttpTransport.BuildHttpRequestAndGetResponse(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData) at POEApi.Transport.HttpTransport.PerformHttpRequest(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData)
at POEApi.Transport.HttpTransport.GetStash(Int32 index, String league, String accountName, String realm, Boolean refresh)
at POEApi.Transport.HttpTransport.GetStash(Int32 index, String league, String accountName, String realm)
at POEApi.Transport.CachedTransport.GetStash(Int32 index, String league, String accountName, String realm, Boolean refresh)
at POEApi.Model.POEModel.GetStash(Int32 index, String league, String accountName, String realm, Boolean forceRefresh)
at POEApi.Model.POEModel.GetAllTabs(String league, String accountName, Stash stash, String realm)
at POEApi.Model.POEModel.GetStash(String league, String accountName, String realm)
[26-11-2023 19:57] System.Exception: Downloading stash for Standard, details logged to DebugInfo.log, please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetStash(String league, String accountName, String realm)
at Procurement.ViewModel.LoginWindowViewModel.LoadStashItems(Character character)
at Procurement.ViewModel.LoginWindowViewModel.d__24.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()

Looking forward to this application to work/support!
DebugInfo.log

@thailyn
Copy link
Contributor

thailyn commented Dec 6, 2023

Thanks for the report. Are you consistently getting this error, or only sometimes? Are you using other programs that access the PoE API at the same time?

@OldGothith
Copy link
Author

OldGothith commented Dec 6, 2023

Thanks for the report. Are you consistently getting this error, or only sometimes? Are you using other programs that access the PoE API at the same time?

Same result every time yes, and no other programs installed for the API.
Restarted windows 11 after new installation more than once with the same result.
Note: most of my tabs are in folders if that has an effect.
Thank you for responding!
Let me know if you need more information. :)
Screenshot 2023-12-05

@thailyn
Copy link
Contributor

thailyn commented Dec 6, 2023

Thanks for the additional details. I am also able to replicate this issue. GGG probably changed how the rate limiting works, or at least the limits. I'll take a look.

@thailyn
Copy link
Contributor

thailyn commented Dec 6, 2023

GGG added (oh, boy, a while ago) additional headers to API responses with information about rate limits that Procurement does not utilize. Details here (that does not talk about any recent changes, if any, but it does document the format).

Example values from a request I sent:

Access-Control-Expose-Headers: X-Rate-Limit-Policy, X-Rate-Limit-Rules, X-Rate-Limit-Account, X-Rate-Limit-Account-State, X-Rate-Limit-Ip, X-Rate-Limit-Ip-State
X-Rate-Limit-Policy: backend-item-request-limit
X-Rate-Limit-Rules: Account,Ip
X-Rate-Limit-Account: 30:60:60,100:1800:600
X-Rate-Limit-Account-State: 1:60:0,34:1800:0
X-Rate-Limit-Ip: 45:60:120,180:1800:600
X-Rate-Limit-Ip-State: 1:60:0,34:1800:0

Based on these headers, the current rate limits for accessing stash tabs (when using a session id) appears to be 30 requests per 60 seconds, and 100 requests per 1800 seconds (30 minutes). The request there per 60 seconds is lower than what Procurement expects (42 requests/60 seconds), so it will consistently bump into the rate limit. It does not take into account any additional rate limits, so the 100 requests per 30 minutes (if that is indeed correct) might drive some other changes in Procurement.

@OldGothith
Copy link
Author

Knowing the primary issue sounds promising.
Without GGG providing the utility for searching our stashes, many exiles are lost searching hundreds of tabs (mostly remove only) for gear/gems/jewels et al.
God speed sir

@thailyn
Copy link
Contributor

thailyn commented Dec 7, 2023

Doing some internal testing: setting the API request limit in Procurement to 30/60 seconds works to avoid the first limit, but, as expected, does not avoid the second. However, while manually inspecting the headers in the responses to the throttled requests, the X-Rate-Limit-Account and X-Rate-Limit-Account-State did not have the expected values. Namely, they were something like (I neglected to copy the exact values):

X-Rate-Limit-Account: 10:60:60,50:1800:600
X-Rate-Limit-Account-State: 1:60:0,1:1800:0

That is, the rate limits were reduced and the account state was reset (including implying no throttling was active, as the third term for each of the limits was 0), but the requests were still being rejected with 429 errors.

Investigation ongoing....

@OldGothith
Copy link
Author

OldGothith commented Dec 7, 2023 via email

@godkill2
Copy link

godkill2 commented Jan 5, 2024

Any way to disable procurement from trying to load up standard characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants