How to set --shm-size 128m on railway Postgres database docker
There's a issue on github telling more about it
https://github.com/docker-library/postgres/issues/416
GitHub
Hit by size limit of /dev/shm · Issue #416 · docker-library/postgres
The default limit for Docker containers seems to be 64MB ERROR: could not resize shared memory segment "/PostgreSQL.2088012784" to 50438144 bytes: No space left on device I couldn't r...
17 Replies
Project ID:
eb397f3a-ebde-411c-ad58-d744a699bed0
eb397f3a-ebde-411c-ad58-d744a699bed0
Seems that a custom start command doesn't work bc it needs to go on image
you mean set a size limit ?
It's a size limit for shared memory in postgres
I think you don´t need set this on railway.
An example of how to run: docker run -it --rm --shm-size 128m alpine:3.7 df -hT /dev/shm
@Michaelvips Actually I need, bc I'm having the error in the railway database.
Because it's not the machine memory but shared memory on docker.
you already using 100% of your account plan resources?
No. Like I said it's not a resource problem, but a docker managment resource problem. Look
I have the hobby plan with 8gb ram, and i'm not using 4gb ram at all
try to remove the comand that is seting the size of memory, I think railway do not support this.
Exactly, I want to set it on the docker image that railways provides but seems like I can't.
you can´t use railway like a standard vps, some functions you can´t access
I know, but as it provides a good docker support, I thought that they can adjust this in some way?
you need create a empy service an then use the image docker
not a database with image
to data base the only image docker you need use is from postgres
@Gabriel Jatobá are you brazilian? if so, do you mind upvoting this community suggestion ? Bora trazer o Railway pro Brasil 😉
Solution
for the record, you can not set flags intended for the docker run command.