2 months ago
It's using way too much RAM—almost 135 GB on average per day. It's a site with very little traffic and minimal database activity, yet when it's idle, it still consumes that excessive amount of RAM. I cleaned up the Django code and temporarily reduced the RAM allocation, but nothing changed. I don't know what else to do; I even removed the container.
1 Replies
Status changed to Awaiting Railway Response Railway • 2 months ago
2 months ago
Mysql grabs a lot of ram by default even when idle, the fix is to override the start command in your railway mysql service settings with this:
docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb_buffer_pool_size=128M --max_connections=50
this limits the buffer pool to 128mb and disables the performance schema which alone eats a ton of ram. also caps connections to 50 since you said traffic is low. after this your mysql should drop to around 250mb instead of that 135gb