Skip to content

Instantly share code, notes, and snippets.

View justindossey's full-sized avatar

Justin Dossey justindossey

  • Laudable Labs
  • San Francisco, CA
View GitHub Profile
@justindossey
justindossey / gist:7490942
Last active December 28, 2015 11:08
ruby 187 memory leak with logger in Bunny::Queue#subscribe
require 'bunny'
require 'logger'
class TestLoggerSubscribeMemleak
def initialize(msg_count=10_000)
@message_count = msg_count
@messages_to_write = msg_count
@connection = Bunny.new(:user=>"test_user", :pass=>"123456", :host=>"localhost", :vhost => "test", :port => 5672)
@connection.start
@channel = @connection.create_channel