jimsynz / faye-rails

Simple Rails glue for the Faye messaging protocol.
MIT License
435 stars 79 forks source link

Memory leak with empty controller. #85

Closed justedd closed 8 years ago

justedd commented 8 years ago

Rails 4.1.4 ruby 2.2.3 and Thin

I use default configuration controller:

class RealAppointmentsController < FayeRails::Controller
end

application.rb

config.middleware.delete Rack::Lock
config.middleware.use FayeRails::Middleware, mount: '/faye', :timeout => 25 do
   map '/appointments' => RealAppointmentsController
   map :default => :block
end

It using like SSE, just calls it from rails controllers in some places like this

RealAppointmentsController.publish('/appointments', @appointment.to_json)

And subscribe/usubscribe on it from client using guid from faye website.

But in development ( not yet tested in production ) i'm loosing 5-30mb of system memroy with each page refresh, untill ruby takes it all and crash.

Any ideas?