Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
postgresql initdb fails: not enough semaphores -- [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
sheepdog
Guru
Guru


Joined: 14 Oct 2002
Posts: 369
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA

PostPosted: Thu Mar 04, 2004 12:26 am    Post subject: postgresql initdb fails: not enough semaphores -- [Solved] Reply with quote

OK. I have installed Gentoo on an amd64 machine and emerged postgresql-7.3.5. But initdb does not start postmaster. Here is the error:
Quote:
creating template1 database in /var/lib/postgresql/data/base/1... IpcSemaphoreCreate: semget(key=129, num=17, 03600) failed: No space left on device

This error does *not* mean that you have run out of disk space.

It occurs when either the system limit for the maximum number of
semaphore sets (SEMMNI), or the system wide maximum number of
semaphores (SEMMNS), would be exceeded. You need to raise the
respective kernel parameter. Alternatively, reduce PostgreSQL's
consumption of semaphores by reducing its max_connections parameter
(currently 1).

Tried re-emerging postgresql again, ipcclean, using default -N -B optional parameters, and different users. Nothing helps.

Will someone who has postgresql running on an amd64 machine please tell me how you did it? Thanks.


Last edited by sheepdog on Thu Mar 04, 2004 4:08 am; edited 1 time in total
Back to top
View user's profile Send private message
roarkh
n00b
n00b


Joined: 24 May 2003
Posts: 70
Location: Bellingham, Washington

PostPosted: Thu Mar 04, 2004 3:53 am    Post subject: Reply with quote

I was having the exact same problem and after much googling I seem to have got it working. Please be advised that I know absolutely nothing about postgresql, I installed it just because a groupware application I wanted to play with requires it. I just now got postgresql to start so have not tested it but you might want to give this a try.

Add the following three lines to /etc/sysctl.conf

Code:
kernel.sem=250   128000   32   1024
kernel.shmall=134217728
kernel.shmmax=134217728


Now reboot.

Actually only the kernel.sem line is required to build the database but when running
Code:
/etc/init.d/postgresql start
it failed. Adding the second two lines allowed
Code:
/etc/init.d/postgresql start
to work (at least for me :D).

You can see what the current values of sem, shmall and shmmax are by looking in /proc/sys/kernel

I hope this helps.

Roark
Back to top
View user's profile Send private message
sheepdog
Guru
Guru


Joined: 14 Oct 2002
Posts: 369
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA

PostPosted: Thu Mar 04, 2004 4:07 am    Post subject: Great!! Reply with quote

roarkh wrote:
I was having the exact same problem and after much googling I seem to have got it working


Fantastic! This not only helps it absolutely saves my bacon! I've been searching for hours on google myself and never saw anything about this file mentioned. Good work and thank you very much. Postgresql now runs. I owe you.

-- Michael
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum