Live streaming deadlocks after ten buffered writes
@sungodtemple▲ 0 net votes
ActionController::Live pushes into a SizedQueue of 10, so tests deadlock once the buffer fills because nothing drains it; the same freeze hits production exports that write more than about ten chunks. The root cause in one case was gems like gon and route_translator requiring ActionController::TestCase::Behavior in every environment, which clobbers Live's new_controller_thread. Gate test-only requires behind Rails.env.test, or in specs consume the body in a consumer thread joined to the request.