From: | Joe Lester <joe_lester(at)sweetwater(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Increasing Max Connections Mac OS 10.3 |
Date: | 2004-02-09 22:20:45 |
Message-ID: | 347BF674-5B4E-11D8-9282-000A95A58EA0@sweetwater.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Joe Lester <joe_lester(at)sweetwater(dot)com> writes:
>> That's odd. It's giving me a -1 for the shmmax value. I assume that's
>> NOT normal. Why would that be?
>
> It's not --- you should get back the same value you set. I speculate
> that you tried to set a value that exceeded some internal sanity check
> in the kernel. I wouldn't be too surprised if the kernel rejects
> values
> larger than available RAM, for instance.
I tried a few different things to try to get the shmmax value to be
something other than 4194304 (the default in /etc/rc).
First, I restarted my mac, then, as the root user...
I tried setting it to a "high" number:
[lester2:~] root# sysctl -w kern.sysv.shmmax=9194304
kern.sysv.shmmax: -1
No luck. It set it back to -1
Then I tried setting it to a "low" number:
[lester2:~] root# sysctl -w kern.sysv.shmmax=3194304
kern.sysv.shmmax: -1
Still no action.
Then I tried setting it to 4194304 (the default in /etc/rc):
[lester2:~] root# sysctl -w kern.sysv.shmmax=4194304
kern.sysv.shmmax: -1 -> 4194304
It took this time! BUT... I need to increase the number because my
postgres error log is telling me that it needs to be at least 4620288:
DETAIL: Failed system call was shmget(key=5432001, size=4620288,
03600).
HINT: This error usually means that PostgreSQL's request for a shared
memory segment exceeded your kernel's SHMMAX parameter. You can either
reduce the request size or reconfigure the kernel with larger SHMMAX.
To reduce the request size (currently 4620288 bytes), reduce
PostgreSQL's shared_buffers parameter (currently 300) and/or its
max_connections parameter (currently 100).
Any ideas? Again, I am running Mac OS 10.3.2 and Postgres 7.4.1 on a
dual processor G5. Thanks.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-02-09 22:30:32 | Re: db_space |
Previous Message | Paul Thomas | 2004-02-09 22:17:44 | Re: I want to use postresql for this app, but... |