Open mrjoes opened 12 years ago
In case it's relevant to anyone else: I've made @mrjoes's suggested change (transient -> temporary) in our fork of sockjs-erlang at https://github.com/ably-forks/sockjs-erlang , after running into the same issue. (Sockjs sessions crashing for legitimate reasons (a service dependency was down) was causing the sockjs application to exit, which doesn't get restarted (even when start_permanent
is set), which ensured it continued to fail even once the reason for the crashes fixed itself).
I was doing some internal tests and here's what I found.
sockjs_session_sup
supervisor which is configured to have up to 10 failures in 10 seconds.I think client processes should be isolated. Even if one client misbehaves, it should not kill whole process tree.
Not sure how to fix it properly, but few ideas:
temporary
restart strategy? The session will be closed anyway -terminate()
is getting called and the session is removed from ETS. Plus, the state is lost, so it can't recover. Or am I missing something?