pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
7.4.3 initdb: could not create semaphores
6+ messages / 3 participants
[nested] [flat]

* 7.4.3 initdb: could not create semaphores
@ 2004-07-02 13:20  teknet@poczta.onet.pl
  0 siblings, 1 reply; 6+ messages in thread

From: teknet@poczta.onet.pl @ 2004-07-02 13:20 UTC (permalink / raw)
  To: pgsql-admin

Hello

I have FreeBSD5.1, postgresql 7.4.3, when i tried to:

initdb -D /usr/local/pgsql/data

i receive:

......

selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data//base/1... FATAL: 
could not create semaphores: No space left on device
DETAIL:  Failed system call was semget(1, 17, 03600).
HINT:  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 10).
        The PostgreSQL documentation contains more information about
configuring your system for PostgreSQL.

initdb: failed
initdb: removing data directory "/usr/local/pgsql/data/"

When i tried to edit in /usr/local/share/postgres/postgresql.conf

and set max_connection = 8 nothing changed, initdb again used:

selecting default max_connections... 10

Why ?

How can i sovle this problem ?

 

Thanx

Michal

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: 7.4.3 initdb: could not create semaphores
@ 2004-07-02 13:58  Corey.Brune@transplace.com
  0 siblings, 1 reply; 6+ messages in thread

From: Corey.Brune@transplace.com @ 2004-07-02 13:58 UTC (permalink / raw)
  To: teknet@poczta.onet.pl; +Cc: pgsql-admin; pgsql-admin-owner@postgresql.org


A really good email from Cheryl Bender near a month ago:

Michael;

What version of FreeBSD?  What version of PostGres?
On my server, running FreeBSD 5.1 and pg 7.3, the values are

kern.ipc.shmmax: 33554432
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 8192
kern.ipc.shm_use_phys: 0
shm    30    35K     38K     4653  16,1024,16384

I found this script (
http://developer.postgresql.org/docs/pgsql/contrib/ipc_check/ ) for
freebsd that checks if changes are needed to shared memory settings for
the number of Buffers requested.  The postmaster man page says the
default buffers are 64, so I ran it with the -B 64 switch and it gave me
the following output

--------------
Bash2.05b$./ipc_check -B 64

shared memory enabled: 32768 kB available

no changes to kernel required for a "-B 64" setting

==========================

semaphores enabled
------------------

Hopefully someone with a lot more experience than me will answer soon
with a better answer, but maybe this will get you started.   Good luck!

Cheryl

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Michael Fork
Sent: Friday, June 11, 2004 6:24 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] FreeBSD & Shared Memory


All,

I am trying to get Postgres running on FreeBSD and am
running into problems
with shared mem.  Here is the postgres error messge:

FATAL:  could not create shared memory segment: Cannot
allocate memory
DETAIL:  Failed system call was shgmet(key=5432001, size=103407616,
03600).
HINT:  This error usually means that PostgreSQL's
request for a shared
memory segment exceeded available memory or swap
space.
To reduce the request size (currently 103407616
bytes), reduce PostgreSQL's
shared_buffers parameter (currently 12288) and/or its max_connections
parameter (cureently 40). The PostgreSQL documentation contains more
information about shared memory configuration.

Here is the output of sysctl (which shows there is
more shared mem available
than postgres is asking for):

bash-2.05b$ sysctl -a | grep shm
kern.ipc.shmmax: 200000000
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 8192
kern.ipc.shm_use_phys: 0

and finally the IPC stats which shows nothing being
used:

Message Queues:
T     ID     KEY        MODE       OWNER    GROUP

Shared Memory:
T     ID     KEY        MODE       OWNER    GROUP

Semaphores:
T     ID     KEY        MODE       OWNER    GROUP

Any ideas why postgres won't start?

Thanks.

Michael




                                                                                                               
                      teknet@poczta.onet.pl                                                                    
                      Sent by:                     To:       pgsql-admin@postgresql.org                        
                      pgsql-admin-owner@pos        cc:                                                         
                      tgresql.org                  Subject:  [ADMIN] 7.4.3 initdb: could not create semaphores 
                                                                                                               
                                                                                                               
                      07/02/2004 08:20 AM                                                                      
                                                                                                               
                                                                                                               




Hello
I have FreeBSD5.1, postgresql 7.4.3, when i tried to:
initdb -D /usr/local/pgsql/data
i receive:
......
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data//base/1... FATAL:
could not create semaphores: No space left on device
DETAIL:  Failed system call was semget(1, 17, 03600).
HINT:  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 10).
        The PostgreSQL documentation contains more information about
configuring your system for PostgreSQL.
initdb: failed
initdb: removing data directory "/usr/local/pgsql/data/"
When i tried to edit in /usr/local/share/postgres/postgresql.conf
and set max_connection = 8 nothing changed, initdb again used:
selecting default max_connections... 10
Why ?
How can i sovle this problem ?

Thanx
Michal







^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: 7.4.3 initdb: could not create semaphores
@ 2004-07-02 14:33  teknet@poczta.onet.pl
  parent: Corey.Brune@transplace.com
  0 siblings, 0 replies; 6+ messages in thread

From: teknet@poczta.onet.pl @ 2004-07-02 14:33 UTC (permalink / raw)
  To: pgsql-admin

Re:

i launched http://developer.postgresql.org/docs/pgsql/contrib/ipc_check/:

-bash-2.05b# ./ipc_check.pl -B 64


shared memory enabled: 32768 kB available

no changes to kernel required for a "-B 64" setting

==========================

and my:

bash-2.05b# sysctl -a |grep shm
kern.ipc.shmmax: 33554432
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 8192
kern.ipc.shm_use_phys: 0
          shm     5    20K     25K     1423  16,1024,16384
bash-2.05b# sysctl -a |grep sem
kern.ipc.semmap: 30
kern.ipc.semmni: 10
kern.ipc.semmns: 60
kern.ipc.semmnu: 30
kern.ipc.semmsl: 60
kern.ipc.semopm: 100
kern.ipc.semume: 10
kern.ipc.semusz: 92
kern.ipc.semvmx: 32767
kern.ipc.semaem: 16384
      acpisem    14     2K      2K       14  128
          sem     4     7K      8K       72  16,1024,4096
debug.acpi_semaphore_debug: 0
p1003_1b.semaphores: 0
p1003_1b.sem_nsems_max: 0
p1003_1b.sem_value_max: 0


bash-2.05b# uname -a
FreeBSD Server 5.1-RELEASE-p16 FreeBSD 5.1-RELEASE-p16 #2: Mon Mar 29
08:44:10 CEST 2004     text@Server:/usr/src/sys/i386/compile/MYKERNEL  i386
bash-2.05b# pg_ctl --version
pg_ctl (PostgreSQL) 7.4.3

and still i can not create initdb....

I remember i had identical problem with FreeBSD and Postgres in the past,
but i can not remind what have i done to solve it...

 

Could anybody help ?

 

Thanx

Michal

 


 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: 7.4.3 initdb: could not create semaphores
@ 2004-07-02 16:44  Tom Lane <tgl@sss.pgh.pa.us>
  parent: teknet@poczta.onet.pl
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2004-07-02 16:44 UTC (permalink / raw)
  To: teknet@poczta.onet.pl; +Cc: pgsql-admin

teknet@poczta.onet.pl writes:
> could not create semaphores: No space left on device
> DETAIL:  Failed system call was semget(1, 17, 03600).
> HINT:  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 10).
>         The PostgreSQL documentation contains more information about
> configuring your system for PostgreSQL.

> How can i sovle this problem ?

You need to increase your kernel's settings for maximum number of
semaphores.  See the admin documentation that the error message is
trying to point you to:

http://www.postgresql.org/docs/7.4/static/kernel-resources.html

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: 7.4.3 initdb: could not create semaphores
@ 2004-07-02 16:54  Corey.Brune@transplace.com
  0 siblings, 1 reply; 6+ messages in thread

From: Corey.Brune@transplace.com @ 2004-07-02 16:54 UTC (permalink / raw)
  To: teknet@poczta.onet.pl; +Cc: pgsql-admin; pgsql-admin-owner@postgresql.org


I have all of these on my server, but postgres does not fail when using
semaphores. What happens when you 'gmake check'?

Thanks,
Corey




                                                                                                               
                      teknet@poczta.onet.pl                                                                    
                      Sent by:                     To:       pgsql-admin@postgresql.org                        
                      pgsql-admin-owner@pos        cc:                                                         
                      tgresql.org                  Subject:  Re: [ADMIN] 7.4.3 initdb: could not create        
                                                    semaphores                                                 
                                                                                                               
                      07/02/2004 09:33 AM                                                                      
                                                                                                               
                                                                                                               




Re:
i launched http://developer.postgresql.org/docs/pgsql/contrib/ipc_check/:
-bash-2.05b# ./ipc_check.pl -B 64

shared memory enabled: 32768 kB available
no changes to kernel required for a "-B 64" setting
==========================
and my:
bash-2.05b# sysctl -a |grep shm
kern.ipc.shmmax: 33554432
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 8192
kern.ipc.shm_use_phys: 0
          shm     5    20K     25K     1423  16,1024,16384
bash-2.05b# sysctl -a |grep sem
kern.ipc.semmap: 30
kern.ipc.semmni: 10
kern.ipc.semmns: 60
kern.ipc.semmnu: 30
kern.ipc.semmsl: 60
kern.ipc.semopm: 100
kern.ipc.semume: 10
kern.ipc.semusz: 92
kern.ipc.semvmx: 32767
kern.ipc.semaem: 16384
      acpisem    14     2K      2K       14  128
          sem     4     7K      8K    & nbsp;  72  16,1024,4096
debug.acpi_semaphore_debug: 0
p1003_1b.semaphores: 0
p1003_1b.sem_nsems_max: 0
p1003_1b.sem_value_max: 0

bash-2.05b# uname -a
FreeBSD Server 5.1-RELEASE-p16 FreeBSD 5.1-RELEASE-p16 #2: Mon Mar 29
08:44:10 CEST 2004     text@Server:/usr/src/sys/i386/compile/MYKERNEL  i386
bash-2.05b# pg_ctl --version
pg_ctl (PostgreSQL) 7.4.3
and still i can not create initdb....
I remember i had identical problem with FreeBSD and Postgres in the past,
but i can not remind what have i done to solve it...

Could anybody help ?

Thanx
Michal










^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: 7.4.3 initdb: could not create semaphores
@ 2004-07-02 17:18  teknet@poczta.onet.pl
  parent: Corey.Brune@transplace.com
  0 siblings, 0 replies; 6+ messages in thread

From: teknet@poczta.onet.pl @ 2004-07-02 17:18 UTC (permalink / raw)
  To: pgsql-admin

I restarted computer and it's working fine:)

I had too small kern.ipc.semmns: 60, maybe some applications did not free
semaphores (?).

Thanx all for help.

 

 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2004-07-02 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-07-02 13:20 7.4.3 initdb: could not create semaphores teknet@poczta.onet.pl
2004-07-02 16:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-07-02 13:58 Re: 7.4.3 initdb: could not create semaphores Corey.Brune@transplace.com
2004-07-02 14:33 ` teknet@poczta.onet.pl
2004-07-02 16:54 Re: 7.4.3 initdb: could not create semaphores Corey.Brune@transplace.com
2004-07-02 17:18 ` teknet@poczta.onet.pl

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox