Search code examples
ruby-on-railsserverunicornserver-sent-events

Rails SSE doesn't work with Unicorn server


I want to use server-side events with rails. It works locally without any problem. But it does not trigger on production with unicorn. Is it possible to use SSE with unicorn?


Solution

  • You need a threaded web server such as Puma, as each connection requires a separate thread to keep the long running connection open.