apns push delay very high, sometimes got huge numbers of "Stream closed before a reply was received" error

264 views
Skip to first unread message

yf chu

unread,
Feb 24, 2021, 10:10:41 PM2/24/21
to pushy

Hi,

  1. We found that the delay of apns push is very high. The delay sometimes is up to 30 minutes.
  2. We often got some errors like "Stream closed before a reply was received". Does it have something to do with the delay? What could be the cause of this error ? 
  3. We call apns service api from China. I am not sure whether these problems are caused by network problems or MAX_CONCURRENT_STREAM  readjustment by apns server.  How can I pinpoint the cause of this issue?
    So any suggestions for these issues?
    Pushy version: 0.13.12
    Thanks.

Shankar Esakki

unread,
Jun 4, 2021, 12:38:05 AM6/4/21
to pushy
Hi Team, 

Does any one have update on this, we are planning to switch to Pushy APNS HTTP/2 implementation by using your library, since the current implementation have delay on concurrency handling of push notifications. 

I'm afraid Pushy also having a similar problem of handling concurrent push

Jon Chambers

unread,
Jun 5, 2021, 10:32:41 AM6/5/21
to pushy
Folks,

If network conditions are bad (which is almost always the case in China, where Apple does not have any APNs servers), then there isn't much Pushy itself can do to improve the situation. Packets will be lost, operations will time out, and connections will close unexpectedly; all of those things are happening at the network level and are beyond Pushy's control. If you have lots of notifications in flight under bad network conditions—i.e. you send notifications as fast as Pushy will accept them—you will likely wind up in a situation where a closed connection results in many in-flight notifications failing with "stream closed before a reply was received."

If you're suffering from this problem and can't locate your servers closer to Apple's servers, my recommendation is to implement some kind of flow control system. Please see https://github.com/jchambers/pushy/wiki/Best-practices#flow-control for additional information.

-Jon
Reply all
Reply to author
Forward
0 new messages