Error: Server could not allocate shared memory segment by id -1
Symptoms
When trying to start a SMA server, the following type of error is displayed, and the SMA server cannot be started.
solidDB process has encountered an internal error and is unable to continue normally. Report the following information to technical support. SOLID Fatal error: Out of central memory when allocating buffer memory (size = 33554432) Date: 2012-04-24 15:39:44 Product: solidDB Version: 7.0.0.2 Build 2012-04-20 [solid1]~ ./solidsma -f -c . Server could not allocate shared memory segment by id -1
Causes
The SMA server startup fails because there is no memory available. This situation can occur under the following conditions:
▪ An a SMA application or SMA server terminates abnormally and leaves shared memory allocated. Even if you shut down all SMA processes, the shared memory is still left reserved.
▪ You have allocated too little memory for SMA use.
Resolving the problem
In Linux and UNIX environments, clear the hanging shared memory segments with the ipcrm command.
For example, in Linux environments, use the following script to identify and remove the unused shared memory segments:
#!/bin/sh if [ $# -ne 1 ] then echo "$0 user" exit 1 fi for shm_id in $(ipcs -m|grep $1|awk -v owner=$1 ' { if ( owner == $3 ) {print $2} }') do ipcrm -m $shm_id done
For more details about the ipcrm command, see your operating system documentation.