For some reason today my worklings stopped talking to my starling
procs. It looks like a zombie workling_monitor was running, but while
looking into the starling logs I found this after restarting:
Starting at
127.0.0.1:15151.
I, [2008-09-16T10:26:24.538262 #22188] INFO -- : Starling STARTUP on
127.0.0.1:15151
E, [2008-09-16T10:26:49.637897 #22188] ERROR -- : Error handling
request: undefined method `>=' for nil:NilClass.
D, [2008-09-16T10:26:49.637999 #22188] DEBUG -- : /usr/local/lib/ruby/
gems/1.8/gems/starling-0.9.8/lib/starling/handler.rb:171:in `get'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/lib/starling/
handler.rb:118:in `process'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/lib/starling/
handler.rb:93:in `receive_data'
/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/
eventmachine.rb:224:in `run_machine'
/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/
eventmachine.rb:224:in `run'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/lib/starling/
server.rb:90:in `run'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/lib/starling/
server_runner.rb:154:in `start'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/lib/starling/
server_runner.rb:33:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/lib/starling/
server_runner.rb:12:in `new'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/lib/starling/
server_runner.rb:12:in `run'
/usr/local/lib/ruby/gems/1.8/gems/starling-0.9.8/bin/starling:5
/usr/local/bin/starling:19:in `load'
/usr/local/bin/starling:19
The offending line is:
break if expiry == 0 || expiry >= now
This fails if expiry is nil. Not sure why it's nil in this case but
that's another question.
Patching the nil pointer in handler.rb seems to resolve the issue and
everything works as normal after killing the zombie proc and
restarting the workling.
Just an FYI, I'd send a patch but this is a quick fix.