sinatra-sse
sinatra-sse copied to clipboard
Memory leak
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.
Think EM is to blame here, see: https://github.com/eventmachine/eventmachine/issues/566
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.)