{"action":"opened","issue":{"url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/764","repository_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm","labels_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/764/labels{/name}","comments_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/764/comments","events_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/764/events","html_url":"https://github.com/JustArchi/ArchiSteamFarm/issues/764","id":305999123,"number":764,"title":"Improve request-backoff throttling","user":{"login":"MikeLund","id":17044744,"avatar_url":"https://avatars2.githubusercontent.com/u/17044744?v=4","gravatar_id":"","url":"https://api.github.com/users/MikeLund","html_url":"https://github.com/MikeLund","followers_url":"https://api.github.com/users/MikeLund/followers","following_url":"https://api.github.com/users/MikeLund/following{/other_user}","gists_url":"https://api.github.com/users/MikeLund/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeLund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeLund/subscriptions","organizations_url":"https://api.github.com/users/MikeLund/orgs","repos_url":"https://api.github.com/users/MikeLund/repos","events_url":"https://api.github.com/users/MikeLund/events{/privacy}","received_events_url":"https://api.github.com/users/MikeLund/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-16T16:42:54Z","updated_at":"2018-03-16T16:42:54Z","closed_at":null,"author_association":"NONE","body":"I've noticed (on stable v3.1.1.1) if you happen to get blocked by Steam/AkamaiGHost for some reason (they can be _very_ sensitive), ASF repeatedly keeps retrying requests, leading to a longer and longer IP block.\r\n\r\nIn condition of connecting when blocked:\r\n```\r\n2018-03-16 12:19:01|dotnet-14890|INFO|STM|Connect() Connecting...\r\n2018-03-16 12:19:02|dotnet-14890|INFO|STM|OnConnected() Connected to Steam!\r\n2018-03-16 12:19:02|dotnet-14890|INFO|STM|OnConnected() Logging in...\r\n2018-03-16 12:19:04|dotnet-14890|INFO|STM|OnLoggedOn() Successfully logged on!\r\n2018-03-16 12:19:04|dotnet-14890|INFO|STM|Init() Logging in to ISteamUserAuth...\r\n2018-03-16 12:19:05|dotnet-14890|INFO|STM|Init() Success!\r\n2018-03-16 12:19:05|dotnet-14890|INFO|STM|IsAnythingToFarm() Checking first badge page...\r\n2018-03-16 12:19:05|dotnet-14890|WARN|STM|UrlGetToStringRetry() Request failed after 5 attempts!\r\n2018-03-16 12:19:05|dotnet-14890|DEBUG|STM|UrlGetToStringRetry() Request failing: https://steamcommunity.com/my/badges?l=english&p=1\r\n2018-03-16 12:19:05|dotnet-14890|WARN|STM|IsAnythingToFarm() Could not get badges' information, we will try again later!\r\n2018-03-16 12:19:05|dotnet-14890|WARN|STM|UrlGetToStringRetry() Request failed after 5 attempts!\r\n2018-03-16 12:19:05|dotnet-14890|DEBUG|STM|UrlGetToStringRetry() Request failing: https://steamcommunity.com/dev/apikey?l=english\r\n2018-03-16 12:19:06|dotnet-14890|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 12:19:06|dotnet-14890|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/gid/103582791440160998\r\n2018-03-16 12:19:06|dotnet-14890|WARN|STM|UrlGetToStringRetry() Request failed after 5 attempts!\r\n2018-03-16 12:19:06|dotnet-14890|DEBUG|STM|UrlGetToStringRetry() Request failing: https://steamcommunity.com/dev/apikey?l=english\r\n2018-03-16 12:19:06|dotnet-14890|WARN|STM|UrlGetToStringRetry() Request failed after 5 attempts!\r\n2018-03-16 12:19:06|dotnet-14890|DEBUG|STM|UrlGetToStringRetry() Request failing: https://steamcommunity.com/dev/apikey?l=english\r\n```\r\nASF should have seen that my IP got blocked and backed off after the first badges request, but instead if kept hitting tons of times, making the problem worse.\r\n\r\nYes, \"just don't get banned by AkamaiGHost, Steam problems aren't ASF's problem\", but maybe this will convince you: if you send a ton of tradeoffers to an ASF user all at once, this victim's IP can end up blocked. To make matters worse, when a new offer comes in after reaching this block condition, ASF retries all these pending offers at the same time (it really doesn't care about ConfirmationsLimiterDelay for example), further making a huge problem.\r\n\r\n```\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084339671\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084307886\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084284886\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084279018\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084273375\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084267242\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084243124\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084220145\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084214422\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084205099\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084199135\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084178315\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084172488\r\n2018-03-16 11:38:26|dotnet-3918|INFO|STM|ParseTrade() Accepting trade: 3084161075\r\n2018-03-16 11:38:28|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:28|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084284886/accept\r\n2018-03-16 11:38:28|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:28|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084339671/accept\r\n2018-03-16 11:38:28|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:28|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084214422/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084273375/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084267242/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084243124/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084205099/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084199135/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084178315/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084172488/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084161075/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084279018/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084220145/accept\r\n2018-03-16 11:38:29|dotnet-3918|WARN|STM|UrlPostRetry() Request failed after 5 attempts!\r\n2018-03-16 11:38:29|dotnet-3918|DEBUG|STM|UrlPostRetry() Request failing: https://steamcommunity.com/tradeoffer/3084307886/accept\r\n```\r\n\r\nAll in all, it's my opinion that this would be a desired change for ASF: if ASF sees that you're blocked (the response usually includes `You don't have permission to access \"http&#58;&#47;&#47;steamcommunity&#46;com&#47;.........\" on this server.`), it should _globally_ back off from all external requests -- no further bots should continue to request steamcommunity until it's possible again.\r\n\r\nThis will probably be quite difficult (all the different threadings, how it should cooperate with the different *LimiterDelay config options, etc), and I can understand if you're not interested in this simply due of that, but please consider the benefits of it.\r\n\r\nHope this issue was clear, and thank you for your time!"}}
{"actor":{"display_login":"MikeLund"}}