-
Notifications
You must be signed in to change notification settings - Fork 334
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
Error 429 (TooManyProviderTokenUpdates) #132
Comments
Still getting this after reducing the number of workers to 20. Any ideas @sideshow? |
For reference, here's the description for TooManyProviderTokens:
How do I prevent the auth token from updating more often than every 20mins? I have the NewTokenClient call in main() so I don't think I'm just updating this on my own. |
Do you reuse the client you create with |
Haven't seen this happen again in a while so I'm going to close this. |
@bmueller we're seeing this issue in production again. How did you resolve the issue? Given that a process may be sending notifications to multiple destinations, we can't reuse the same client for all messages. Is the solution to keep a pool of clients around, one for each token? |
Yes, I believe this error is when you spam apple with too many different Authentication Token's. The token you generate with the token package should be reused if possible, ie make sure you're not generating a new token each time. |
I'm periodically getting status code 429 (TooManyProviderTokenUpdates) back from the push server. This happens every other day or so, for around 100-200 notifications that were all sent at the exact same time. Any idea what might be causing this?
I'm using go version 1.12.4 on Heroku with a single dyno.
Below is the code I'm using to spin up the workers. I currently have up to 50 workers going at once, I'll try reducing that to 20 to see if the issue recurs. But not sure yet whether that is the cause.
Also, does apns2 retry these pushes if this error is returned? Or do I have to handle that myself?
`func collectPush(rw http.ResponseWriter, req *http.Request) {
}`
The text was updated successfully, but these errors were encountered: