R
Railway3w ago
Jean

Postgres ERROR: could not resize shared memory segment: No space left on device

Trying to run a VACUUM on my Postgres tables, I get the following error on the biggest one : VACUUM ANALYZE student_time_slot; ERROR: could not resize shared memory segment "/PostgreSQL.2416765338" to 67146144 bytes: No space left on device Here are my tables having dead rows:
schemaname | relname | n_dead_tup
------------+--------------------------+------------
public | student_time_slot | 558434
public | directus_activity | 71499
public | student_review_round_day | 2309
public | directus_users | 1685
public | student_review_round | 844
public | directus_sessions | 516
public | directus_permissions | 75
public | directus_roles | 36
public | directus_presets | 20
schemaname | relname | n_dead_tup
------------+--------------------------+------------
public | student_time_slot | 558434
public | directus_activity | 71499
public | student_review_round_day | 2309
public | directus_users | 1685
public | student_review_round | 844
public | directus_sessions | 516
public | directus_permissions | 75
public | directus_roles | 36
public | directus_presets | 20
On StackOverflow all what I find concerns Docker run parameters I can't manage myself here: https://stackoverflow.com/questions/56751565/pq-could-not-resize-shared-memory-segment-no-space-left-on-device Also, obviously, I checked that my Pg service has remaining space as shared in the attachments Any advice ?
Stack Overflow
pq: could not resize shared memory segment. No space left on device
I have on a dashboard, a number of panels (numbering around 6)to display data points chart making queries to dockerised instance of PostgreSQL database. Panels were working fine until very recently,
No description
No description
Solution:
You can set the shm size! RAILWAY_SHM_SIZE_BYTES=134217728 (128MB) You don't need anywhere near 4GB given the amount in the error....
Jump to solution
7 Replies
Percy
Percy3w ago
Project ID: 65aff0db-6586-4be0-8420-b2e67ae4378d
Jean
JeanOP3w ago
65aff0db-6586-4be0-8420-b2e67ae4378d
Solution
Brody
Brody3w ago
You can set the shm size! RAILWAY_SHM_SIZE_BYTES=134217728 (128MB) You don't need anywhere near 4GB given the amount in the error.
Jean
JeanOP3w ago
Hi @Brody , I added to the env var of my Pg service which triggered a redeploy. So I don't know if I did well or if the reboot itself unlocked the situation, flushing all the dead rows. Could you confirm me I added it at the right place? If so, thank you very much!
Attacler/Bart
Attacler/Bart3w ago
a little tip about Directus, you can disable the activity logging per module, saving you some space
Brody
Brody3w ago
yes you've correctly added it to the database, you're good to go!
Jean
JeanOP3w ago
Thank you, I already disabled all the revisions but the activity log is too much important to understand our users (activation, retention...). I already deleted the logs of the past year btw Big up to "@Brody the savior"! ^^
Want results from more Discord servers?
Add your server