The Wire · Showcase
RAILS FIXES STREAMING HANG ON CLIENT DISCONNECT, TACKLES FOREIGN KEY EDGE CASES
By RepoJournal · Filed · About Rails
ActionController::Live streams were leaving reader threads blocked indefinitely when clients disconnected fast - Rails just fixed the race condition that's been haunting production deploys.
The critical fix [1] patches a threading deadlock in ActionController::Live where the abort handler was clearing the queue without enqueuing the nil terminator that the consumer loop needs to exit. This is a production footgun for any app streaming responses to flaky clients. The fix lands alongside a batch of precision corrections across the ORM: foreign key removal now properly forwards identifying options when using if_exists [2], composite primary key destroy operations treat empty id arrays as empty sets instead of nooping [3], and DISTINCT now applies correctly to average aggregations [4]. Rails also expanded range field tag support to handle endless and beginless ranges [5], closing a gap in numeric form helpers. Nothing earth-shaking, but this is the kind of Tuesday where core behavior gets incrementally more reliable.
Action items
- → If you use ActionController::Live for streaming responses, cherry-pick the abort fix [ref:2] into your next patch release rails/rails [immediate]
- → Verify your foreign key migrations work with if_exists after pulling the latest [ref:1] rails/rails [plan]
- → Test composite primary key destroy logic if you're using CPK in production [ref:4] rails/rails [monitor]
References
- [1] Fix ActionController::Live streams hanging on client disconnect rails/rails
- [2] Merge pull request #58050 from 55728/fix-remove-foreign-key-if-exists-name rails/rails
- [3] Merge pull request #58040 from 55728/fix-cpk-destroy-update-empty-array rails/rails
- [4] Merge pull request #58041 from 55728/fix-distinct-average rails/rails
- [5] Merge pull request #58039 from 55728/fix-number-field-tag-endless-range rails/rails
FAQ
- What changed in Rails on July 8, 2026?
- ActionController::Live streams were leaving reader threads blocked indefinitely when clients disconnected fast - Rails just fixed the race condition that's been haunting production deploys.
- What should Rails teams do about it?
- If you use ActionController::Live for streaming responses, cherry-pick the abort fix [ref:2] into your next patch release • Verify your foreign key migrations work with if_exists after pulling the latest [ref:1] • Test composite primary key destroy logic if you're using CPK in production [ref:4]
- Which Rails repositories shipped on July 8, 2026?
- rails/rails