[CalendarServer-dev] [Calendar and Contacts Server] #421: Create PostgreSQL DB on run CalendarServer - could not create shared memory segment

Calendar and Contacts Server trac at macosforge.org
Mon Mar 14 08:32:26 PDT 2011

#421: Create PostgreSQL DB on run CalendarServer - could not create shared memory
 Reporter:  donaldinos@…          |       Owner:  wsanchez@…        
     Type:  Defect                |      Status:  new               
 Priority:  5: Not set            |   Milestone:  CalendarServer-3.x
Component:  Calendar Server       |    Severity:  Crash/data loss   
 Keywords:                        |       Radar:                    
 This issue occurs on execute ./run from command line on FreeBSD 8

 2011-03-14 16:37:37+0100 [-] Unhandled Error
         Traceback (most recent call last):
           File "/usr/local/lib/python2.6/site-
 packages/twisted/internet/_baseprocess.py", line 60, in
 line 153, in processEnded
           File "/usr/local/lib/python2.6/site-
 packages/twisted/internet/defer.py", line 318, in callback
           File "/usr/local/lib/python2.6/site-
 packages/twisted/internet/defer.py", line 424, in _startRunCallbacks
         --- <exception caught here> ---
           File "/usr/local/lib/python2.6/site-
 packages/twisted/internet/defer.py", line 441, in _runCallbacks
             self.result = callback(self.result, *args, **kw)
 line 407, in doCreate
             raise RuntimeError("Unable to initialize postgres database:
 %s" % (result,))
         exceptions.RuntimeError: Unable to initialize postgres database:
 The files belonging to this database system will be owned by user
         This user must also own the server process.

  The database cluster will be initialized with locale C.

         creating directory
 ... ok
         creating subdirectories ... ok
         selecting default max_connections ... 10
         selecting default shared_buffers/max_fsm_pages ... 400kB/20000
         creating configuration files ... ok
         creating template1 database in
 ... FATAL:  could not create shared memory segment: Cannot allocate memory
         DETAIL:  Failed system call was shmget(key=1, size=1818624,
         HINT:  This error usually means that PostgreSQL's request for a
 shared memory segment exceeded available memory or swap space. To reduce
 the request size (currently 1818624 bytes), reduce PostgreSQL's
 shared_buffers parameter (currently 50) and/or its max_connections
 parameter (currently 10).
                 The PostgreSQL documentation contains more information
 about shared memory configuration.
         child process exited with exit code 1
         initdb: removing data directory

Ticket URL: <http://trac.calendarserver.org/ticket/421>
Calendar and Contacts Server </>

More information about the calendarserver-dev mailing list