473,408 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

postgres start problems with memory

I keep getting this error.

DETAIL: Failed system call was shmget(key=5432001, size=34037760, 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 34037760 bytes), reduce
PostgreSQL's shared_buffers parameter (currently 2048) and/or its
max_connections parameter (currently 1024).
If the request size is already small, it's possible that it is
less than your kernel's SHMMIN parameter, in which case raising the
request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about
shared memory configuration.

I've change kernel.shmmax and kernel.shmmin a couple of times, and I
can't get it to work.

I'm passing

-N 1024
-B 2048

to postmaster, it's the gentoo install default. This is what I have
right now for kernel values

root # sysctl -a | grep shm
kernel.shmmni = 4096
kernel.shmall = 31584400
kernel.shmmax = 31584400

Does the amount of RAM in the computer make a difference? I added more
RAM recently and upped the kernel to 4mb ram (something-or-rather) to
allow for over 1gig. It started up fine then. I restarted the computer
today and I can't get postgres to start now.

How can I fix this? What are some good standards? I've read this
http://www.postgresql.org/docs/7.4/i...resources.html
but it didn't help much.

Thanks.

-Josh

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
3 5089
On Thu, 30 Sep 2004 13:39:57 -0500, Josh Close <na****@gmail.com> wrote:
I keep getting this error.

DETAIL: Failed system call was shmget(key=5432001, size=34037760, 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 34037760 bytes), reduce
PostgreSQL's shared_buffers parameter (currently 2048) and/or its
max_connections parameter (currently 1024).
If the request size is already small, it's possible that it is
less than your kernel's SHMMIN parameter, in which case raising the
request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about
shared memory configuration.

I've change kernel.shmmax and kernel.shmmin a couple of times, and I
can't get it to work.

I'm passing

-N 1024
-B 2048

to postmaster, it's the gentoo install default. This is what I have
right now for kernel values

root # sysctl -a | grep shm
kernel.shmmni = 4096
kernel.shmall = 31584400
kernel.shmmax = 31584400

Does the amount of RAM in the computer make a difference? I added more
RAM recently and upped the kernel to 4mb ram (something-or-rather) to
allow for over 1gig. It started up fine then. I restarted the computer
today and I can't get postgres to start now.

How can I fix this? What are some good standards? I've read this
http://www.postgresql.org/docs/7.4/i...resources.html
but it didn't help much.

Thanks.

-Josh


Ok. I got it started by changing

kernel.shmmax = 134217728
kernel.shmall = 134217728

Why does this make it work? wasn't it high enough before? I went by
the "reasonable value" that the postgres docs says of

250 kB + 8.2 kB * shared_buffers + 14.2 kB * max_connections up to infinity

but that didn't work.

Can anyone explain this to me? I'd like to be able to customize
postgresql, and I'm getting 2 gigs of ram to put in.

Thanks.

-Josh

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2

Josh Close <na****@gmail.com> writes:
To reduce the request size (currently 34037760 bytes), .... root # sysctl -a | grep shm
kernel.shmmni = 4096
kernel.shmall = 31584400
kernel.shmmax = 31584400


So it's currently looking for 34M and you're setting the maximum to 31M.

--
greg
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #3
On 30 Sep 2004 16:40:58 -0400, Greg Stark <gs*****@mit.edu> wrote:

Josh Close <na****@gmail.com> writes:
To reduce the request size (currently 34037760 bytes),

...
root # sysctl -a | grep shm
kernel.shmmni = 4096
kernel.shmall = 31584400
kernel.shmmax = 31584400


So it's currently looking for 34M and you're setting the maximum to 31M.

--
greg

We'll, you're definitely right about that. Is there a certain standard
to this? Say if I use the "reasonable value" formula. What would be a
good size for the buffer then? Should it be a certain %age of
available RAM?

-Josh

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: N.K. | last post by:
Hi, I've just installed postgres on the Linux server. It is supposed to start automatically which I think it does since I can run an sql stmt right away. When I'm trying to connect from a remote...
7
by: Abdul-Wahid Paterson | last post by:
Hi, I have had a site working for the last 2 years and have had no problems until at the weekend I replace my database server with a newer one. The database migration went like a dream and I had...
4
by: Gellert, Andre | last post by:
Hello, we installed a new Postgres 7.4.0 on a Suse 9 system. This is used as a part of an extranet , based on Apache+PHP and has besides a ldap server no services running. The system has dual...
2
by: Adam Witney | last post by:
Forwarding to the mailing list, as I don't know how to fix it.... ------ Forwarded Message From: Henning Klein <kleinh@rz.uni-potsdam.de> Date: Tue, 22 Jun 2004 22:09:08 +0200 To:...
7
by: David Teran | last post by:
Hi, maybe anyone already knows that Apple is distributing Postgres 7.3.3 with RemoteDesktop 2. Its located in /System/Library/CoreServices/RemoteManagement/rmdb.bundle/ BUT... they did not do...
18
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra...
6
by: jao | last post by:
My company has a product in beta which uses Postgres 7.4.3. We expect to have a code freeze for our 1.0 product in March 2005. I'd really like to use Postgres 8.x in our 1.0 product. We're...
3
by: fjm67 | last post by:
I am new to PHP but not so new to Postgres. If someone can either direct me to some howto or even provide me with an example, I would be grateful. I would like to know if it is possible to...
1
by: micofarmer | last post by:
We are running a PHP web-based frontend with a Postgres 7.2 backend on a Windows 2000 Server box with automated backups of the server being handled by Legato. We are experiencing several problems...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.