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:.
Debugging a Stack Overflow in Rails 7.2.1.1 #ruby #rubydeveloper #rubyonrails #Debugging #Stack #Overflow #Rails #7.2.1.1 https://rubyonrails.ba/link/debugging-a-stack-overflow-in-rails-7-2-1-1