Menu

Startup problemq

2005-04-25
2012-08-31
  • sagreschapp

    sagreschapp - 2005-04-25

    Hello, I am receiving the following when trying to start postgresql:

    FATAL: could not create shared memory segment: Invalid argument
    DETAIL: Failed system call was shmget(key=5432001, size=10338304, 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 10338304 bytes), reduce PostgreSQL's shared_buffers parameter (currently 1000) and/or its max_connections parameter (currently 100).

    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.

    Any help would be appreciated.

     
    • Andy Satori

      Andy Satori - 2005-04-25

      This error means that your system has other things allocating shared memory. You'll frequently see this with iChat A/V. Please change the number of concurrent connections in your postgresql.conf file,

      sudo bash
      cd /Library/PostgreSQL8/data
      vi postgresql.conf

      scroll down to the to max_connections=100 line and change it to a smaller number. I use 10 on my development machine and reserve 100 for my dedicated servers.

      (x deletes a single character in vi, i starts edit mode, esc ends edit mode)

      :w
      :q

      exit
      exit

      restart postgres.

       
      • Andy Satori

        Andy Satori - 2005-04-25

        I'd probably reduce the shared mem max to 500 and see if that works. It's definately a limit issue.

         
    • sagreschapp

      sagreschapp - 2005-04-25

      Andy, similar message after changing the .conf to =10
      Should I reduce the shared buffers value? If so, what would you suggest? Thanks for your help.

      FATAL: could not create shared memory segment: Invalid argument
      DETAIL: Failed system call was shmget(key=5432001, size=9109504, 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 9109504 bytes), reduce PostgreSQL's shared_buffers parameter (currently 1000) and/or its max_connections parameter (currently 10).

       
      • Marcel

        Marcel - 2005-04-25

        Marc Liyanage has instructions on his site how to solve this problem:
        http://www.entropy.ch/phpbb2/viewtopic.php?p=2783#2783

        I installed pgsql on several machines running 10.2 and 10.3 from source (this package didn't exist in those days ;-) ). I had to change those parameters as detailed in the link above on some of them, but not on all. Somehow strange, it seems to depend on what other software is also running on the machine.
        Anyway, with the changes done it always worked afterwards.

         
    • sagreschapp

      sagreschapp - 2005-04-25

      Same issue:

      FATAL: could not create shared memory segment: Invalid argument
      DETAIL: Failed system call was shmget(key=5432001, size=4907008, 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 4907008 bytes), reduce PostgreSQL's shared_buffers parameter (currently 500) and/or its max_connections parameter (currently 10).

      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.

      Marcel: Thanks for the link - I will try these modifications and report back.

       
    • matthias tarasiewicz

      can we put this somehow in the installer or in a README, so people don't run into the same problems again and again?

       

Log in to post a comment.

MongoDB Logo MongoDB