impress/public
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
..
images Extract error-grundo.png into an image file 2024-02-19 11:19:28 -08:00
outfits Delete some unused public/assets files 2023-10-23 19:05:09 -07:00
stylesheets Remove compass-rails 2023-10-23 19:05:09 -07:00
.gitignore Move gitignore out of the assets folders 2023-10-23 19:05:09 -07:00
403.html restructure backend of closet hanger quantity updates 2011-07-15 16:16:40 -04:00
404.html rails 3 2010-05-14 18:12:31 -04:00
422.html rails 3 2010-05-14 18:12:31 -04:00
500.html rails 3 2010-05-14 18:12:31 -04:00
favicon.ico monocle favicon 2013-12-26 12:44:03 -05:00
maintenance.html Extract error-grundo.png into an image file 2024-02-19 11:19:28 -08:00
outage.html Add custom 502 error page, for when the app goes down but nginx is up 2024-02-19 13:19:31 -08:00
stopped.html Add handlers for requests that were stopped during the reboot process 2024-02-28 13:50:13 -08:00