This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Server doesn't crash if actor crashes #12
Comments
I have ran into this too. My workaround was to rescue |
@eterry1388 Thank you so much for chiming in. Could you provide some example code showing your technique? |
It's more of a hack than a solution. Here is some code: require 'celluloid/dns'
class TestServer < Celluloid::DNS::Server
def process( name, resource_class, transaction )
@resolver ||= Celluloid::DNS::Resolver.new( [[:udp, '8.8.8.8', 53], [:tcp, '8.8.8.8', 53]] )
transaction.passthrough!( @resolver )
rescue Celluloid::DeadActorError => e
puts 'Hit exception! Celluloid::DeadActorError. Killing process...'
puts name
puts e
puts e.backtrace
`killall -9 ruby`
end
end
server = TestServer.new( listen: [[:udp, '0.0.0.0', 53]] )
server.run
sleep After reading this again, it looks like he was using |
@eterry1388 I am He. rubydns is implemented with celluloid-dns and I thinks share the identical problem. |
Sorry guys I missed all this for some reason. I'll take a look. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Given this code:
and this query:
nslookup -type=cname www.example.com
This error happens:
The actors are permanently crashed, but the error isn't raised up to the main ruby process, so that process continues on, but is unable to process additional requests.
Is there a way to have crashed actors result in an exception raised to the outer process?
I'm using rubydns, but I figure this is a celluloid-dns problem. Let me know if that's not the case.
The text was updated successfully, but these errors were encountered: