Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apns sandbox connection crash #119

Open
simonxuhao opened this issue Dec 21, 2016 · 0 comments
Open

apns sandbox connection crash #119

simonxuhao opened this issue Dec 21, 2016 · 0 comments
Labels

Comments

@simonxuhao
Copy link

Hi,

When my app starts, it creates both apns and apns sandbox connections, sometimes the sandbox connection crashes (exception exit: {in_closed,timeout}, see below), why is this happening? Will apns4erl recreate the connection? Should I add some code to handle connection lost?

=CRASH REPORT==== 21-Dec-2016::10:16:59 ===
crasher:
initial call: apns_connection:init/1
pid: <0.1939.0>
registered_name: myapp_apns_sandbox_conn
exception exit: {in_closed,timeout}
in function gen_server:terminate/7 (gen_server.erl, line 812)
ancestors: [apns_sup,<0.566.0>]
messages: []
links: [<0.567.0>,<0.1940.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 2586
stack_size: 27
reductions: 13755
neighbours:
neighbour: [{pid,<0.1940.0>},
{registered_name,[]},
{initial_call,{apns_queue,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},
{ancestors,[myapp_apns_sandbox_conn,apns_sup,<0.566.0>]},
{messages,[]},
{links,[<0.1939.0>]},
{dictionary,[]},
{trap_exit,false},
{status,waiting},
{heap_size,233},
{stack_size,9},
{reductions,18}]

=SUPERVISOR REPORT==== 21-Dec-2016::10:16:59 ===
Supervisor: {local,apns_sup}
Context: child_terminated
Reason: {in_closed,timeout}
Offender: [{pid,<0.1939.0>},
{id,connection},
{mfargs,
{apns_connection,start_link,
[myapp_apns_sandbox_conn,
{apns_connection,"gateway.sandbox.push.apple.com",
2195,undefined,
"/etc/myapp/apns/dev_cert.pem",
undefined,undefined,undefined,30000,
#Fun<myapp_apns.handle_apns_error.2>,
"feedback.sandbox.push.apple.com",2196,
#Fun<myapp_apns.handle_apns_delete_subscription.1 >,
1800000,300,[],#Fun<error_logger.error_msg.2>,
#Fun<error_logger.info_msg.2>}]}},
{restart_type,transient},
{shutdown,5000},
{child_type,worker}]

@ferigis ferigis added the 1.x label Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants