dnsimple / erldns

DNS server, in Erlang.
MIT License
397 stars 98 forks source link

Why erldns_server_sup is not under supervision tree? #35

Closed T0ha closed 3 years ago

T0ha commented 8 years ago

erldns_server_sup for some reason is started not from supervision tree. This makes erldns not crash, but run defunctional when servers crash for some reason. Can I fix it or there are some reason I've missed?

aeden commented 8 years ago

Are you seeing specific crashes? If so, can you provide the crash details?

It might make sense to put it under this supervisor under a supervision tree as well, however there is a caveat: erldns_server_sup must be started only when the start_servers event is received. This is necessary to ensure all zones are loaded in the cache before answering requests.

T0ha commented 8 years ago

What about supervisor:start_child(erldns_sup,

{id => erldns_sup,

                           start => { erldns_server_sup, start_link, [] },
                           restart => permanent,
                           shutdown => 5000,
                           type => supervisor,
                           modules => [erldns_sup]}),

???

aeden commented 8 years ago

If you would like to submit a PR I can test it out in the DNSimple environment and make sure it does not negatively impact operations.

T0ha commented 8 years ago

I'll do it in a while

aeden commented 3 years ago

This will be fixed as part of the 2.x.x release.