high memory usage
Hi, I just opened an app on the hobby plan but it keeps getting stopped due to high memory usage even after I raised the limits from $10 to $12 recently
https://github.com/adnjoo/XpenseTrackr/issues/44
It's a standard ruby on rails (7) app with a postgres database attached.
Just wondering if anybody has an idea why the memory usage might be high? I'm the only user beta-testing the app right now so it seems weird to me..
GitHub
railway memory usage · Issue #44 · adnjoo/XpenseTrackr
problem: december memory usage high - possibly due to ?multiple migrations potential solution: check january usage try alternative PAAS e.g. heroku? or digitalocean
8 Replies
Project ID:
df4f61cc-0a52-42e8-8e04-46c2904b91a9
df4f61cc-0a52-42e8-8e04-46c2904b91a9
app memory usage
do you have a
WEB_CONCURRENCY
variable set? try setting it to 2haven't done that yet..
I just added RAILS_MAX_THREADS to 2..
is it recommended to set e.g. WEB_CONCURRENCY to 2?
i think you should try it
https://github.com/adnjoo/XpenseTrackr/blob/main/config/puma.rb#L17
Concurrent.physical_processor_count
would likely be "seeing" the host machines 32 (or more) cores and could be spawning far to many workers, since each worker and thread will take a reserve amount of ram, that could be where your excess ram usage is coming from.
if puma spawns two threads per worker that could theatrically be a whopping 64 workers, more than a hobby project would ever needk I'll try it thank u so much 😄
no problem! let me know if it makes a difference