The backend service uses the same copy to push to many users in batches. This year, the following problem began to occur. Using http2 send is normal, but when getting the result through the stream id, it always times out. Restarting the service still times out. I hope Apple development engineers can help me find out what the problem is.
Batch push issues for commercial apps
First I want to make sure what you mean by "it always times out". Which I would take it as you are not able to send a single push request.
Is that the case? Or do you mean it times out for some requests some of the time? If the former, this is likely an issue with your configuration or network resources. If it is the latter, read on...
Problems like this usually turn out to be one of several things:
- not having enough bandwidth at your backend for the send speed of the batch
- same issue on the network between the backend and APNs
- having too short a timeout for the conditions.
- not opening enough connections to APNs from a host.
You would also want to get some packet logs on your end to see what actually might be going on.
Time out mean some pn task requests always occurs,but other pn task is normal.
I'm not sure if the apns server actively disconnects or rejects certain requests, because we restarted the service and the timeout problem still occurred.