• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


30 Nov, 2024

Updated at 02 Dec, 2024

Can't increase db_shared_buffers (0.1% of total ram) and db_work_mem (0.03% of total ram)

This is a bit of a head scratcher :upside_down_face:

Have a freshly migrated Discourse instance on a new server.

Getting the error in logs: PG::DiskFull (ERROR: could not resize shared memory segment "/PostgreSQL.1759815625" to 8388608 bytes: No space left on device )

It’s strange because, the previous server (64gb ram) didn’t have this issue and I had these set:

db_shared_buffers: "25632MB"
db_work_mem: "160MB"

On the new server (128gb ram), I can’t increase above the baseline defaults (I tried tripling the values below and get the same PG DiskFull error):

db_shared_buffers: "128MB"
db_work_mem: "40MB"

Previous machine has docker 27.x on it (auto installed via the discourse installer). New machine installed docker.io as per instructions (so 26.x). I tried switching to docker 27.x to see if that was related - but it didn’t change anything. Both are on the Stable Discourse branch, version 3.3.2.

It seems shm_size might be the main culprit:

Though no idea why it wasn’t an issue on the previous server and it is on the new server. The only other main difference is the old server uses Ubuntu 22.04 LTS and the new server is on 24.04 LTS.

I tried this also, but the changes get overwritten when the container is started again

shm_size appears to be hardcoded into the launcher:

Any insights or help would be appreciated! :meow_heart:

3 posts - 2 participants

Read full topic