Re: [HACKERS] Error: shmget failed - SOLVED!

From: Roberto Joao Lopes Garcia <roberto(at)mha(dot)com(dot)br>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Error: shmget failed - SOLVED!
Date: 1999-10-27 12:20:57
Message-ID: 3.0.5.32.19991027102057.008298f0@pop.hipernet.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

To change maximun Shared Memory segment size in my Sparc Solaris 2.5, I
have to add the following line into /etc/system file and then reboot the
system

set shmsys:shminfo_shmmax=268435456

It solved the problem.

Also, Solaris ANSWER BOOK recomends to change the follow. Please note that
I do not test the lines bellow in my system, only the above change in
/etc/system solved the problem.

set semsys:seminfo_semmap=250
set semsys:seminfo_semmni=500
set
semsys:seminfo_semmns=500
set semsys:seminfo_semmsl=500
set
semsys:seminfo_semmnu=500
set semsys:seminfo_semume=100
set
semsys:seminfo_shmmin=200
set semsys:seminfo_shmmni=200
set
semsys:seminfo_shmseg=200

To see the actual system sets one can use the command sysdef that, in my
system produce the follow:

#sysdef
.
.
. ...
*
* IPC Semaphores
*
10 entries in semaphore map (SEMMAP)
10
semaphore identifiers (SEMMNI)
60 semaphores in system (SEMMNS)
30
undo structures in system (SEMMNU)
25 max semaphores per id (SEMMSL)

10 max operations per semop call (SEMOPM)
10 max undo entries per
process (SEMUME)
32767 semaphore maximum value (SEMVMX)
16384 adjust on
exit max value (SEMAEM)
*
* IPC Shared Memory
*
268435456 max shared memory
segment size (SHMMAX)
1 min shared memory segment size (SHMMIN)
100
shared memory identifiers (SHMMNI)
6 max attached shm segments per
process (SHMSEG)
*
* Time Sharing Scheduler Tunables
*
60 maximum time
sharing user priority (TSMAXUPRI)
SYS system class name (SYS_NAME)
#

Please read the man pages before execute this command or the changes showed
above.

Thank you for you help

Roberto

At 12:51 26/10/99 -0400, you wrote:
>> Roberto Joao Lopes Garcia <roberto(at)mha(dot)com(dot)br> writes:
>> > I tried to start postmaster and it report an error, see bellow:
>> > IpcMemoryCreate: shmget failed (Invalid argument) key=5432001,
>> > size=1073152, permission=600
>> > FATAL 1: ShmemCreate: cannot create region
>>
>> As a quick hack you can start the postmaster with smaller-than-
>> normal -B and -N (say -B 40 -N 20). Long term solution is to
>> increase your kernel's SHMMAX limit to more than 1 megabyte.
>>
>> I thought we had adjusted the default -B and -N to stay just
>> under a meg, which is the default SHMMAX value on many kernels.
>> But it looks like someone chewed up some more shared memory when
>> I wasn't looking :-(.
>
>7.0 backend will point them to FAQ on such errors.
>
>--
> Bruce Momjian | http://www.op.net/~candle
> maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
>
>************
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-10-27 14:55:48 Re: [HACKERS] Function-manager redesign: second draft (long)
Previous Message Keith Parks 1999-10-27 11:02:21 Syntax error in psqlHelp.h