forked from OpenNeo/impress
Dress to Impress, a big fancy Neopets customization tool!
Matchu
271d477110
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! |
||
---|---|---|
.vscode | ||
app | ||
bin | ||
config | ||
db | ||
deploy | ||
lib | ||
public | ||
test | ||
vendor | ||
.gitignore | ||
.ruby-version | ||
config.ru | ||
Gemfile | ||
Gemfile.lock | ||
LICENSE.md | ||
package.json | ||
Procfile.dev | ||
Rakefile | ||
README.md | ||
yarn.lock |
Dress to Impress
Oh! We've been revitalizing the Rails app! Fun!
There'll be more to say about it here soon :3