1
0
Fork 0
forked from OpenNeo/impress
impress/app/controllers
Emi Matchu bc8d265672 Add handlers for requests that were stopped during the reboot process
According to our GlitchTip error tracker, every time we deploy, a
couple instances of `Async::Stop` and `Async::Container::Terminate`
come in, presumably because:

1. systemd sends a STOP signal to the `falcon host` process.
2. `falcon host` gives the in-progress requests some time to finish up
3. Sometimes some requests take too long, and so something happens.
   (either a timer in Falcon or a KILL signal from systemd, not sure!)
   that leads the ongoing requests to finally be terminated by raising
   an `Async::Stop` or `Async::Container::Terminate`. (I'm not sure
   when each happens, and maybe they happen at different points in the
   process? Maybe one happens for the actual long-running ones, vs the
   other happens if more requests come in during the meantime but get
   caught in the spin-down process?)
4. Rails bubbles up the errors, our Sentry library notices them and
   sends them to GlitchTip, the user presumably receives the generic
   500 error, and the app can finally close down gracefully.

It's hard for me to validate that this is *exactly* what's happening
here or that my mitigation makes sense, but my logic here is basically,
if these exceptions are bubbling up as "uncaught exceptions" and
spamming up our error log, then the best solution would be to catch
them!

So in this change, we add an error handler for these two error classes,
which hopefully will 1) give users a better experience when this
happens, and 2) no longer send these errors to our logging 🤞️

That strange phenomenon where the best way to get a noisy bug out of
your logs is to fix it lmao
2024-02-28 13:50:13 -08:00
..
fundraising Move most fundraising files into a Fundraising module 2024-02-18 20:12:14 -08:00
alt_styles_controller.rb Read known_glitches when loading alt styles SWF assets 2024-02-24 16:31:05 -08:00
application_controller.rb Add handlers for requests that were stopped during the reboot process 2024-02-28 13:50:13 -08:00
closet_hangers_controller.rb High-level caching for closet lists 2024-02-20 18:43:39 -08:00
closet_lists_controller.rb Use flash[:notice] instead of flash[:success] 2023-10-23 19:05:07 -07:00
contributions_controller.rb Migrate away from item translations in contributions 2024-02-20 15:52:10 -08:00
item_appearances_controller.rb Load item page restricted zones data from Rails app, not impress-2020 2023-11-11 08:49:19 -08:00
item_trades_controller.rb Oops, load the data for the bulk item quantity form on the trades page! 2024-01-21 06:42:24 -08:00
items_controller.rb Filter search in wardrobe-2020 by alt styles! 2024-02-27 16:11:06 -08:00
locales_controller.rb locale cookie should be long-term, not a session cookie 2013-01-24 18:24:33 -06:00
neopets_connections_controller.rb closet hangers index uses neopets connections dropdown 2014-01-18 22:50:14 -06:00
neopets_page_import_tasks_controller.rb Fix petpage etc import 2023-11-06 12:59:28 -08:00
outfits_controller.rb Migrate away from item translations in misc pages 2024-02-20 15:53:56 -08:00
pet_types_controller.rb Remove unused /colors/pet_types route 2024-02-24 15:51:40 -08:00
pets_controller.rb Migrate away from item translations in misc pages 2024-02-20 15:53:56 -08:00
sitemap_controller.rb Migrate away from item translations in misc pages 2024-02-20 15:53:56 -08:00
static_controller.rb yum, new campaigns 2015-08-05 19:26:12 -04:00
users_controller.rb Use flash[:notice] instead of flash[:success] 2023-10-23 19:05:07 -07:00