1gb warning is too course grained

We’re running 2xt3.micros (AWS 1gb VPS) as web only discourse instances, and separate postgres and redis boxes (i.e. 4gb of RAM total), but discourse is very keen to spam me that I have insufficient memory, since on a single instance (even though there’s nothing else running!) I have slightly under 1_000_000 bytes (and so ram_check triggers the memory_warning message). I could scale this out forever, reduce sidekiq to 0 and unicorn workers to 1, and discourse would still be telling me that…

A trivial fix would be to change 1_000_000 to something like 950_000. Perhaps a better fix would be to only emit the warning if its running on the same host as the database, and disable it otherwise (since if you’ve split them, you’re presumably controlling your own destiny…).

I can understand if you don’t care too much about this, but would you accept the trivial PR? (changing 1_000_000 to 950_000?)

2 Likes

Sounds OK to me at least.

1 Like
3 Likes