Thread: PGSQL Bug
Hello, I've noticed the following issue when autostarting PostgreSQL under Ubuntu 12.04 64bit by bootup. I'm using PostgreSQL 9.1. A manual service start works (service postgresql start). 2013-07-18 06:44:12 CEST FATAL: could not create shared memory segment: Das Argument ist ung?ltig 2013-07-18 06:44:12 CEST DETAIL: Failed system call was shmget(key=5432001, size=41263104, 03600). 2013-07-18 06:44:12 CEST 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 41263104 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. 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. 2013-07-18 07:17:28 CEST FATAL: could not create shared memory segment: Das Argument ist ung?ltig 2013-07-18 07:17:28 CEST DETAIL: Failed system call was shmget(key=5432001, size=41263104, 03600). 2013-07-18 07:17:28 CEST 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 41263104 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. 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. Thank you.
Michael Kunzmann wrote > Hello, > > I've noticed the following issue when autostarting PostgreSQL under > Ubuntu 12.04 64bit by bootup. I'm using PostgreSQL 9.1. > > A manual service start works (service postgresql start). Not sure what you actually think is the bug...especially since PostgreSQL starts when run manually. Apparently the boot routine for "bootup" is trying to launch PostgreSQL before the SHM... parameters are exported with sufficient values to support your configuration. Or, the boot routine is trying to start a different instance of PostgreSQL than the one you start manually. I am not that strong a linux user but it does seem you need to provide considerably more detail as to your install/configuration if you expect help resolving your issue. Specifically, HOW did you install PostgreSQL and what configuration steps have you performed. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/PGSQL-Bug-tp5764244p5764249.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
On Wed, Jul 17, 2013 at 10:46 PM, Michael Kunzmann <mail@michaelkunzmann.com > wrote: > > I've noticed the following issue when autostarting PostgreSQL under > Ubuntu 12.04 64bit by bootup. I'm using PostgreSQL 9.1. > > 2013-07-18 06:44:12 CEST FATAL: could not create shared memory segment: > How much RAM do you have, and what does the output of the following command: sysctl -ar 'kernel.shm'
On Thu, Jul 18, 2013 at 10:52 AM, Michael Kunzmann <mail@michaelkunzmann.com > wrote: > Am 18.07.2013 17:33, schrieb bricklen: > > > On Wed, Jul 17, 2013 at 10:46 PM, Michael Kunzmann < > mail@michaelkunzmann.com> wrote: > >> >> I've noticed the following issue when autostarting PostgreSQL under >> Ubuntu 12.04 64bit by bootup. I'm using PostgreSQL 9.1. >> >> 2013-07-18 06:44:12 CEST FATAL: could not create shared memory segment: >> > > How much RAM do you have, and what does the output of the following > command: > sysctl -ar 'kernel.shm' > > Hello, I have 8GB of RAM. > > The values are: > kernel.shm_rmid_forced = 0 > kernel.shmall = 2097152 > kernel.shmmax = 268435456 > kernel.shmmni = 4096 > > Set your kernel.shmall and kernel.shmmax higher in /etc/sysctl.conf. Eg. kernel.shmall = 6442450944 kernel.shmmax = 6442450944 -- Reload after changing it sudo sysctl -p More details can be found here: http://www.postgresql.org/docs/current/static/kernel-resources.html