Keary Suska <hierophant@pcisys.net> writes:
> I need to increase the max connections for my postgres installation but when
> I do I get the dreaded "semget: No space left on device" error. Where can I
> find information on the relationship between max connections and buffers and
> shared memory/semaphores?
You evidently need to raise SEMMNI: your setup is eating 127 of the 128
you have allowed.
It does seem odd that you have
------ Semaphore Status --------
used arrays = 127
allocated semaphores = 159
Postgres will normally allocate 17 semaphores per semaphore ID (a/k/a
semaphore array). It looks to me like some not-Postgres application has
chewed up 125 semaphore IDs to represent only one actual semaphore apiece.
Postgres took two more for 17 apiece, then choked trying to get a third.
What else are you running ... and have you complained to them about
their profligacy with semaphore IDs?
regards, tom lane