Debugging a Stack Overflow in Rails 7.2.1.1

26-Nov-2025 525
A few weeks ago, after upgrading NeetoCal from Rails 7.1.5.2 to Rails 7.2.1.1, we started seeing mysterious crashes in production with the error message SystemStackError: stack level too deep. Identifying the problem The crash happened inside Slots::SyncAllCalendarsService, a service that syncs multiple calendars concurrently using the Async gem. What made it particularly puzzling was that switching from Async::Barrier to Thread.new made the error disappear. This led us down a rabbit hole thinking it was an Async-specific issue. The stack trace pointed to a strange location:.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle