ostinelli / apnotic

A Ruby APNs HTTP/2 gem able to provide instant feedback.
MIT License
477 stars 95 forks source link

Proper Handling for Errors (e.g. SSL Expired) #119

Open ksylvest opened 2 years ago

ksylvest commented 2 years ago

Our application recently encountered an issue with Sidekiq processes crashing due to an expired APN certificate. The root of this issue appears to have stemmed from the usage of abort_on_exception within the dependent HTTP-2 library.

Per the author, the abort_on_exception is problematic when used with Sidekiq. To fix, our team is investigating using on(:error) { |exception| ... } callback fixes the process crashes per your documentation (https://github.com/ostinelli/apnotic#methods).

It appears that this causes the thread to hang until some sort of internal timeout is resolved. Is it possible to stop execution when an error is encountered safely without killing the parent thread?

Linuus commented 5 months ago

It appears that this causes the thread to hang until some sort of internal timeout is resolved. Is it possible to stop execution when an error is encountered safely without killing the parent thread?

Related to https://github.com/ostinelli/net-http2/issues/52 ?