Chris Ochs
unread,Jan 30, 2012, 3:00:02 PM1/30/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to EventMachine
This is with jruby 1.6.5 and the latest release version of
eventmachine
We are using udp for logging to syslog and are running into a strange
bug. We run the reactor in it's own thread in rails, and call
send_datagram within an EM.schedule block. Following is the code I'm
using to track down where the issue is.
After several thousand messages, the code inside Em.schedule just
stops being called. The EM_SCHEDULE puts statement no longer
displays. This only happens during production, which makes me think
that it's barfing on some specific content.
In our load testing where the log messages are generally shorter and
not driven by real user data, we don't see this. We can send several
million messages without issue.
Any ideas?
def send_msg(data)
puts "SEND_MSG #{data}"
EM.schedule do
puts "EM_SCHEDULE"
begin
@syslog_sd.send_datagram(data, @syslog_server,
@syslog_port)
rescue Exception => e
puts "LOG_ERROR: #{data}\n\n #{e.message}
#{e.backtrace.join("\n")}"
end
end
end