1
0
Fork 0
forked from OpenNeo/impress
Dress to Impress, a big fancy Neopets customization tool!
Find a file
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
.devcontainer Save last trade activity time onto User 2024-01-19 00:00:46 -08:00
.husky Set up eslint for wardrobe-2020 2023-11-02 18:11:07 -07:00
app Add handlers for requests that were stopped during the reboot process 2024-02-28 13:50:13 -08:00
bin Upgrade to Rails 7.1.1 2023-10-25 15:05:31 -07:00
config Migrate from Sentry to self-hosted GlitchTip instance 2024-02-28 13:14:32 -08:00
db Update series_name for alt styles to be null, with a fallback string 2024-02-27 15:48:28 -08:00
deploy Add slow query logging to MariaDB config 2024-02-26 11:06:51 -08:00
lib Save manifest load info when preloading them, too 2024-02-25 16:02:36 -08:00
public Add handlers for requests that were stopped during the reboot process 2024-02-28 13:50:13 -08:00
test Save last trade activity time onto User 2024-01-19 00:00:46 -08:00
vendor Run bundle update 2024-02-22 11:48:32 -08:00
.eslintrc.json Set up eslint for wardrobe-2020 2023-11-02 18:11:07 -07:00
.gitignore Add .env.* to gitignore 2023-10-27 17:44:12 -07:00
.ruby-version Finish migrating to Ruby 3.3.0 2024-02-22 12:05:02 -08:00
.yarnrc.yml Upgrade to Yarn 4.0.2 2024-01-14 23:05:53 -08:00
config.ru Upgrade to Rails 6.1.7.4 2023-10-23 19:05:07 -07:00
falcon.rb Remove supervisor from the Falcon process? 2024-01-24 00:20:23 -08:00
Gemfile Finish migrating to Ruby 3.3.0 2024-02-22 12:05:02 -08:00
Gemfile.lock Finish migrating to Ruby 3.3.0 2024-02-22 12:05:02 -08:00
LICENSE.md Update our license 2023-10-23 19:04:56 -07:00
package.json Upgrade to Yarn 4.0.2 2024-01-14 23:05:53 -08:00
Procfile.dev Fix bin/dev to use the right settings in development 2023-11-02 16:54:39 -07:00
Rakefile Uninstall resque 2023-10-23 19:05:04 -07:00
README.md Oops, needs to be a README.md file! 2023-10-25 16:31:41 -07:00
yarn.lock Upgrade to Yarn 4.0.2 2024-01-14 23:05:53 -08:00

Dress to Impress beach logo

Dress to Impress

Oh! We've been revitalizing the Rails app! Fun!

There'll be more to say about it here soon :3