-
Notifications
You must be signed in to change notification settings - Fork 346
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
APNSP8 : a very few amount of ios rpush notifications are stuck in processing mode #648
Comments
Just ran in to the same issue! Although I looked at the code but don't understand why this is happening. Here is the error message:
And this notification number 5 is stuck in processing:
When I looked at the code, I do see there's rpush/lib/rpush/daemon/apnsp8/delivery.rb Lines 21 to 41 in eb48a90
|
I'm also seeing a number of notifications stuck in processing on my RPush workers. Seems to be similar behavior to this, which was previously resolved: #494 |
Still an issue, anyone resolved this? Also catching Errno::ECONNRESET and retry? |
seems like a "healthcheck" should be done: "Reuse a connection as long as possible. In most cases, you can reuse a connection for many hours to days. If your connection is mostly idle, you may send a HTTP2 PING frame after an hour of inactivity. Reusing a connection often results in less bandwidth and CPU consumption." https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns#3634319 also discussed here node-apn/node-apn#454 |
We ended up creating a job that we run regularly using Sidekiq scheduler that just retries recently failed notifications. It's not elegant but it does the job:
|
System configuration:
Issue
A very few amount of IOS rpush notifications (using apnsp8) are stuck in busy mode on sidekiq. The status of this rpush remains in
processing
inrpush_notifications
table.Context
Having 5 workers, plenty IOS rpush notifs succeed. But i consistently have until 4 workers that are in busy mode, with IOS rpush notifs.
No matter how many workers i have (from 3 to 10), all of them but one eventualy fall in "busy mode" for hours with IOS rpush notifs.
I moved recently from APNS to APNSP8 and did not have this issue before.
Expected behavior
Either the job launching rpush notification should fail and go to retry, either it should succeed and be moved from "busy" to "processed job". But it should not stay in busy mode for hours or more.
code
Here is the code i use to send ios notifications :
The text was updated successfully, but these errors were encountered: