views:

226

answers:

2

We develop an iPhone app, and have push notification for development and ad hoc version working properly. But when we try to send push notification to real user devices in our database, we got SSL connection reset, then Broken pipe error. We think maybe there are too many devices in our database (more than 70000), so it is failed to send all messages at the same time. So we try to send messages to 1000 devices once, but still got this "Broken pipe" error for around 100 messages. And we are not sure whether the messages have been send. Any suggestion?

+1  A: 

We have solved this problem. It is broken due to invalid tokens in our database table.And apple apns service will disconnect us if there is an invalid token. Since the connection is broken, it will have "Broken Pipe" error when you try to send messages again. Basic solution is to find whether writing to pipe is successful, if not, just disconnect and reconnect again after some delay.

emagic
A: 

Hi emagic, how are things? I was looking at your answer and I have exactly the same problem you mention here. I was wondering if you could share with me the solution you created and in which language you implemented this. Do you think it's possible to send me the code you created?

Thanks a lot mgasparotto