Thread: BUG #5264: could not create shared memory segment: Invalid argument
The following bug has been logged online: Bug reference: 5264 Logged by: venkat nemani Email address: nemani.venkat87@gmail.com PostgreSQL version: 8.4 Operating system: ubuntu 9.10 Description: could not create shared memory segment: Invalid argument Details: * Restarting PostgreSQL 8.4 database server * The PostgreSQL server failed to start. Please check the log output: 2010-01-05 12:30:00 IST FATAL: could not create shared memory segment: Invalid argument 2010-01-05 12:30:00 IST DETAIL: Failed system call was shmget(key=5432001, size=1108156416, 03600). 2010-01-05 12:30:00 IST 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 1108156416 bytes), reduce PostgreSQL's shared_buffers parameter (currently 131072) and/or its max_connections parameter (currently 803). 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. [fail]
On 5/01/2010 3:06 PM, venkat nemani wrote: > 2010-01-05 12:30:00 IST 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 1108156416 bytes), > reduce PostgreSQL's shared_buffers parameter (currently 131072) and/or its > max_connections parameter (currently 803). This is not a bug. The hint above explains what is wrong, and the PostgreSQL documentation goes into more detail on configuring shared memory. You need to lower shared_buffers, lower max_connections, and/or increase your kernel's shared memory limit. With 803 connections, I'm guessing you have one connection per client. Avoid this if possible - use a server-side connection pooler. -- Craig Ringer