Re: could not create shared memory segment: Invalid argument

From: Ryan King - NOAA Affiliate <ryan(dot)king(at)noaa(dot)gov>
To: Scott Whitney <scott(at)journyx(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: could not create shared memory segment: Invalid argument
Date: 2015-07-14 00:26:53
Message-ID: CAJAJqWFwm5wrqD4hWtmooXiR9eK9xuqs9pvfOZG8ZKBCPMTXbQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-performance

Hi Scott. Removing the other groups and only copying admin.

Here are the current settings - I know very low, but I just kept going
downwards until there was no where else to go:

# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 68719476736 - orginal
#kernel.shmmax = 16833540096
kernel.shmmax = 168

# Controls the maximum number of shared memory segments, in pages
#kernel.shmall = 4294967296 - orginal
kernel.shmall = 4109751

Thanks

Ryan King

Internet Dissemination Group, Kansas City

Shared Infrastructure Services Branch

National Weather Service

Contractor / Insight Global <https://www.insightglobal.net/> / Ace Info
Solutions, Inc. <http://www.aceinfosolutions.com/>

On Mon, Jul 13, 2015 at 7:15 PM, Scott Whitney <scott(at)journyx(dot)com> wrote:

> What is your kernel SHMMAX? Usually somewhere under /etc/sysconfig.
> Depends on your distro. This is telling you that your kernel does not have
> sufficient resources.
>
> -------- Original message --------
> From: Ryan King - NOAA Affiliate <ryan(dot)king(at)noaa(dot)gov>
> Date: 07/13/2015 7:10 PM (GMT-06:00)
> To: pgsql-general(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org,
> pgsql-performance(at)postgresql(dot)org
> Subject: Re: [ADMIN] could not create shared memory segment: Invalid
> argument
>
> Apologies ahead of time for not knowing which group to send to, but
> I wanted to see if anyone has encountered and resolved this type of error.
> I'm setting up postgresql 9.2 streaming replication on RH and after copying
> the master data directory over to the slave, the psql service refuses start
> and gives the following errors.
>
>
>
> 2015-07-13 23:55:41.224 UTC FATAL: could not create shared memory
> segment: Invalid argument
> 2015-07-13 23:55:41.224 UTC DETAIL: Failed system call was
> shmget(key=5432001, size=1146945536, 03600).
> 2015-07-13 23:55:41.224 UTC 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
> 1146945536 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.
> 2015-07-13 23:56:21.344 UTC FATAL: could not create shared memory
> segment: Invalid argument
> 2015-07-13 23:56:21.344 UTC DETAIL: Failed system call was
> shmget(key=5432001, size=58302464, 03600).
> 2015-07-13 23:56:21.344 UTC 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
> 58302464 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.
>
>
>
> I've set shared_buffer way down to next to nothing along with
> kernel.shmmax and kernel.shmall per some blogs. However, the same error
> persists, and I'm getting no where. I think ultimately the solution is to
> upgrade, but the devs may not be ready for an upgrade at this point. Any
> help would be greatly appreciated. Thanks!
>
>
> Journyx, Inc.
> 7600 Burnet Road #300
> Austin, TX 78757
> www.journyx.com
>
> p 512.834.8888
> f 512-834-8858
>
> Do you receive our promotional emails? You can subscribe or unsubscribe
> to those emails at http://go.journyx.com/emailPreference/e/4932/714/
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2015-07-14 00:43:18 Re: could not create shared memory segment: Invalid argument
Previous Message Scott Ribe 2015-07-14 00:16:57 Re: could not create shared memory segment: Invalid argument

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2015-07-14 00:43:18 Re: could not create shared memory segment: Invalid argument
Previous Message Scott Ribe 2015-07-14 00:16:57 Re: could not create shared memory segment: Invalid argument

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Ribe 2015-07-14 00:43:18 Re: could not create shared memory segment: Invalid argument
Previous Message Scott Ribe 2015-07-14 00:16:57 Re: could not create shared memory segment: Invalid argument