-
Notifications
You must be signed in to change notification settings - Fork 206
Hi @abuzuhri, thanks for providing the rate limiting. But it looks like I am still getting throttled on this particular function: #178
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
Comments
@igoryan-k please recheck if you have another instance running in different server that take the limit or you share the Keys with another ... |
@TechyChap share this code that working perfectly with him in .net core services.AddSingleton(c => new AmazonConnection(new AmazonCredential()
{
AccessKey = settings.AccessKey,
SecretKey = settings.SecretKey,
RoleArn = settings.RoleArn,
ClientId = settings.ClientId,
ClientSecret = settings.ClientSecret,
RefreshToken = settings.RefreshToken,
MarketPlace = MarketPlace.UnitedKingdom,
Environment = settings.UseSandbox ? Constants.Environments.Sandbox : Constants.Environments.Production
})); In case you use unit testing better to use wrapper to mock method you need public class AmazonListingService : IAmazonListingService
{
private readonly AmazonConnection _connection;
public AmazonListingService(AmazonConnection connection)
{
_connection = connection;
}
public async Task<ListingsItemSubmissionResponse> PutListingsItemAsync(ParameterPutListingItem listing)
{
return await _connection.ListingsItem.PutListingsItemAsync(listing);
}
} |
This is essentially what I use as well and still have issues. A drawback of this singleton is that changes to the settings would require application restart, right? |
If you are changing settings then perhaps something like IOptionsMonitor might work - https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-6.0 I need to support multiple market places so my plan is to implement multiple connections, one for each marketplace. So won't be changing parameters once created. Not written the code for that yet but will likely be using a named instance. |
@rcalv002 are you still facing problem ? |
Yes indeed |
Yes
…On Sat, May 14, 2022 at 8:55 AM Tareq Abuzuhri ***@***.***> wrote:
@rcalv002 <https://github.com/rcalv002> are you still facing problem ?
—
Reply to this email directly, view it on GitHub
<#178 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBDHNNUR5O3B46XUKKUKX3VJ65GDANCNFSM5VEKCYJQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Do you try last version we fix that |
Hi abuzuhri I havent tried in a while, Actually I didn't respond 6 hours ago.. very strange. |
I am currently getting this for requests that are made to the |
@ProNotion have you got multiple instances running at the same time? or do you restart the application every time it runs? |
Only 1 instance but during development it is regularly restarted so perhaps that is the cause. I agree with the scalability of it needing to be addressed somehow. |
Hi @abuzuhri, thanks for providing the rate limiting. But it looks like I am still getting throttled on this particular function:
connection.CatalogItem.ListCatalogItemsAsync().
I am getting "You exceeded your quota for the requested resource." error after about 30 requests. I tried to rate limit myself to 1 request per second and still getting it even though the rate is supposed to be 5 times per second. Any ideas?
It's a little hard to debug since the rate limit header is not exposed by the library.
Originally posted by @igoryan-k in #109 (comment)
The text was updated successfully, but these errors were encountered: