exception_notification icon indicating copy to clipboard operation
exception_notification copied to clipboard

Catch ActiveRecord::ConnectionTimeoutError

Open wkrsz opened this issue 9 years ago • 2 comments

I had misconfigured ActiveRecord connect pool: just enough connections for Puma but not for sucker_punch workers. Under higher load requests were failing with ActiveRecord::ConnectionTimeoutError. Unfortunately there was no notification because the exception was raised earlier in Rack middleware, before exception notifier.

I solved this by inserting exception notifier lower in middleware stack:

config.app_middleware.insert_before ActiveRecord::ConnectionAdapters::ConnectionManagement, ExceptionNotification::Rack

Maybe this should be a default in lib/exception_notification/rails.rb?

wkrsz avatar May 06 '15 08:05 wkrsz

+1 for this hint

woto avatar Aug 29 '15 01:08 woto

@WojtekKruszewski sounds right, can you create a PR for it?

smartinez87 avatar Aug 29 '15 21:08 smartinez87