raix-push icon indicating copy to clipboard operation
raix-push copied to clipboard

APN connection timeout

Open MaxShv opened this issue 9 years ago • 5 comments

We are getting the following issue in production. Is it possible to update to the newer version of node-apn? It seems like it was fixed in version 1.7.2 (https://github.com/argon/node-apn/issues/217).

Connect timed out stack:Error: Connect timed out
at Connection. (/bundle/bundle/programs/server/npm/node_modules/meteor/raix_push/node_modules/apn/lib/connection.js:193:36)
at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)

MaxShv avatar Apr 12 '16 17:04 MaxShv

+1

Same problem here on production. If I reboot servers and send the same notification, it succeeds.

What do you think is the cause? Because mine works again, I can't believe it's an out of date certificate. I'm suspecting it's a volume problem (I('m sending to thousands of named devices). Would be great to have your thoughts on the matter, so a workaround can be created.

Alveoli avatar May 01 '16 07:05 Alveoli

Make sure the needed ports are open on the network

raix avatar May 03 '16 12:05 raix

Hi! Yep, ports are open.

In my case I was pushing tens of thousands of notifications via a single call to Push.send({query:{}}). That seemed to have fouled something up.

I've worked around it by putting far fewer pushes through each Push.send call and using sendInterval and sendBatchSize to control push speed. Works well now!

Alveoli avatar May 03 '16 13:05 Alveoli

ah gotcha @Alveoli - It might be helpful for others if we could improve docs on that

raix avatar May 03 '16 15:05 raix

+1

Crashed my server this morning.

crossiety-one | Error: Connect timed out crossiety-one | at Connection.<anonymous> (/bundle/bundle/programs/server/npm/node_modules/meteor/raix_push/node_modules/apn/lib/connection.js:193:36) crossiety-one | at Timer.listOnTimeout (timers.js:92:15)

https://github.com/raix/push/issues/229

pozylon avatar Dec 02 '16 10:12 pozylon