Code Monkey home page Code Monkey logo

Comments (10)

trx222 avatar trx222 commented on August 12, 2024 1

I will setup a test tomorrow.

from node-apn.

petitchevalroux avatar petitchevalroux commented on August 12, 2024

I can confirme our worker is in the air doing nothing.

All the "write" part is a bit messy, maybe check to https://github.com/AndrewBarba/apns2/blob/master/lib/http2-client.js as a replacement of client.js. To me it appears cleaner ;)

(Despite session.setTimeout steel missing)

from node-apn.

TysonAndre avatar TysonAndre commented on August 12, 2024

@petitchevalroux Refer to https://github.com/AndrewBarba/apns2/issues/33 - there's quite a few unaddressed review comments, and that file does call setTimeout but seems like it introduce different potential failure modes (e.g. it can be establishing multiple connections to APNs concurrently in connect(), but only use one).

You may be interested in #27 - A few unit tests of failure modes were added but I haven't tested this against the real apns servers for a prolonged period of time yet.

from node-apn.

petitchevalroux avatar petitchevalroux commented on August 12, 2024

No I haven't seen this problem but it's a great find, @trevh3 comments sound interesting.
I dove into http2 for the first time yesterday so I don't understand all. We will check #27 and potentially test its behavior next week.

At the moment we are not sure that timeout is the real problem. But from my first client.js read and this issue it's my first guess We enabled debug mode in production to see if we can have more information on the "worker in the air" effect.

Thanks for your feedback ;)

from node-apn.

trx222 avatar trx222 commented on August 12, 2024

I also do not understand why the problem is back now - and we have it really often. We actually have implemented an own watchdog .... waiting 10 sec and then creates a new APN Provider and continues. But we are sending packages with 100 receivers and I do not know which of them have received the notification and which not.
We will try now the new version but I think only the timeout will not solve the problem. We are already checking for others ways to send - with curl or whatever.
The version worked over month - but now it happens nearly on every message.

btw.
I posted in parse forum ( https://community.parseplatform.org/t/node-apn-problem-send-hangs/871/5 ) but cool that now issues is enabled here.

from node-apn.

TysonAndre avatar TysonAndre commented on August 12, 2024

We actually have implemented an own watchdog .... waiting 10 sec and then creates a new APN Provider and continues. But we are sending packages with 100 receivers and I do not know which of them have received the notification and which not.

@trx222 frequently opening and closing connections to APNs may make the problem worse - APNs may treat frequently opening and closing connections as a malfunctioning client or a denial of service and block connections from your IP address. (I forget where I read that.)

from node-apn.

trevh3 avatar trevh3 commented on August 12, 2024

You saw it in Apple's APNS documentation

Keep your connections with APNs open across multiple notifications; do not repeatedly open and close connections. APNs treats rapid connection and disconnection as a denial-of-service attack. You should leave a connection open unless you know it will be idle for an extended period of time—for example, if you only send notifications to your users once a day, it is acceptable practice to use a new connection each day.

from node-apn.

trx222 avatar trx222 commented on August 12, 2024

Yes sure - I know this part and we only do a limited number of retrys ( 3 to 5 times ) and then we give up ... But what else should I do - I cannot completly stop sending in that case. We anyways have 30 parallel processes for sending to speed up everything - otherwise it takes to long for transmitting everything.

But The problem also happens if we have just 300 receivers sending in one process ... it makes no difference.

from node-apn.

davimacedo avatar davimacedo commented on August 12, 2024

Guys, could try with this branch? #29

It looks working better for me in my tests, but it would be good to have more feedback before merging.

from node-apn.

rileyweber avatar rileyweber commented on August 12, 2024

I think this can be closed now with the release of 4.0.0?

from node-apn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.