Dress to Impress, a big fancy Neopets customization tool!
Find a file
Matchu 271d477110 Add RAM constraints to impress service on in production
I just restarted the impress app in production! First I logged in to see
why it wasn't responding, and I saw that there was almost no free RAM
left, and that the Rails app had grown to eat it all up!

So in this change, we set a memory limit: if the impress app is taking
up more than 75% of the machine's RAM, systemctl will try to shrink it
down; if it can't, then it will kill the app at 80%.

I'm not totally sure whether these bounds are tight enough? I didn't
look closely enough at the numbers to see what the app's actual usage
was according to systemctl at the time (`sudo systemctl status
impress`), so my hope is this is enough. But if we run into a memory
leak crash like that again, because it turns out even existing at 75%
RAM freezes the machine when running alongside its other processes, we
can decrease these numbers!

I also don't know the nature of the memory leak, and that could be worth
investigating—the app pretty cleanly fits into ~500–600MB when it starts
up, but then does seem to slowly but steadily grow. If it could be kept
at that size, it's possible we could downgrade the server and save some
costs—but that's a question for another day, since making sure we handle
memory leaks when they *do* happen is a more important robustness fix!
2023-10-26 13:52:44 -07:00
.vscode Add the Pardon Our Dust page 2023-10-23 19:05:09 -07:00
app Remove unused Javascript utility libraries 2023-10-25 16:24:50 -07:00
bin Upgrade to Rails 7.1.1 2023-10-25 15:05:31 -07:00
config Remove unused neopia_host config variable 2023-10-25 16:20:28 -07:00
db Stop orphaning hangers when deleting lists 2023-10-24 15:35:21 -07:00
deploy Add RAM constraints to impress service on in production 2023-10-26 13:52:44 -07:00
lib Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
public Stop saving local copies of SWFs 2023-10-23 19:05:10 -07:00
test Remove unused automated testing files & gems 2023-10-25 16:09:01 -07:00
vendor Remove unused automated testing files & gems 2023-10-25 16:09:01 -07:00
.gitignore Remove Vagrant config 2023-10-23 19:05:09 -07:00
.ruby-version Upgrade to Ruby 3.1.4 2023-10-23 19:05:07 -07:00
config.ru Upgrade to Rails 6.1.7.4 2023-10-23 19:05:07 -07:00
Gemfile Remove unused automated testing files & gems 2023-10-25 16:09:01 -07:00
Gemfile.lock Remove unused automated testing files & gems 2023-10-25 16:09:01 -07:00
LICENSE.md Update our license 2023-10-23 19:04:56 -07:00
package.json Add Prettier to dev dependencies 2023-10-24 16:37:06 -07:00
Procfile.dev Bundle wardrobe-2020 into the app 2023-10-23 19:05:08 -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 Add Prettier to dev dependencies 2023-10-24 16:37:06 -07: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