sinatra-sse icon indicating copy to clipboard operation
sinatra-sse copied to clipboard

Memory leak

Open virtualfunction opened this issue 10 years ago • 2 comments

  get '/', provides: 'text/event-stream' do
    sse_stream &:close
  end

Just doing this and running this about 10 times shows an increase in mem usage.

httperf --server=localhost --port=3000 --uri=/ --num-conns=500 --rate=500

I've used EM.add_periodic_timer(5) { CG.start } and found it doesn't get collected.

virtualfunction avatar Feb 09 '15 14:02 virtualfunction

Think EM is to blame here, see: https://github.com/eventmachine/eventmachine/issues/566

virtualfunction avatar Feb 09 '15 19:02 virtualfunction

Jason, thank you for looking into that. I am not able to look into the issue right now, but I would happily accept patches if you find sinatra-sse to blame (or just a workaround.)

radiospiel avatar Feb 09 '15 21:02 radiospiel