-
Notifications
You must be signed in to change notification settings - Fork 389
Is it possible to implement my own retry strategy? #1248
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
I found a few problems with this issue:
|
The problem is FCM sending back 503 errors for some notifications, when they were actually delivered. It should be possible to safely retry a request on 503. @chong-shao WDYT? |
We acknowledge that the increase on 503 is a backend problem. We are currently prioritizing resolving it. Let's keep this thread open, I'll update once the backend problem is resolved and we can look at the retry mechanism but I guess at that time there will be a very small number of 503s. |
We've opened up a support ticket with you regarding this issue, as we have experienced it when sending to 100-1000 batches of 200-500 tokens each. In some cases around 500 of our batches reaches a timeout and are getting several duplicated notifications. What we've seen is that when a batch reaches the internal 10 second limit (seen here
Our work-around at the moment is to remove ETIMEDOUT from ioErrorCodes in the defaultRetryConfig. |
@cati-net yours issue is different from the one discussed in this thread. We can look into increasing the timeout as a potential resolution to your problem. But do you know what causes this many requests to timeout? Have you ruled out any possible network or hardware issues? |
Hi @shvedovvladimir our backend has recovered and the error rate have dropped. Is this duplicated delivery problem still happening to you? |
We reduced to 100 the number of sent messages in the request (on next day), and the problem did not occur again |
Thanks for the reply! I'll go ahead and close this issue. Please let me know if you have other questions. |
I've tried sending notifications using firebase-admin. On my server side, there were network problems and I got a response from firebase with a 503 code (or some like), but messages were sent to devices anyway. According to the default retry strategy, my server resubmitted the request. As a result, I received 2 push notifications.
I want to set retry attempts lower. How can I fix that?
The text was updated successfully, but these errors were encountered: