This section provides instructions and guidelines on how to prevent or troubleshoot common problems while configuring or using SMA.
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: 2014-11-30 15:39:44 Product: solidDB® Version: 100.0.0.0 Build 2014-11-30 [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 if:
▪When a SMA application or SMA server terminates abnormally, they can leave 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.
This leads to a situation where all memory is used and you cannot start a SMA server any more.
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 on the ipcrm command, see your operating system documentation.
Cannot map shared memory area
Symptoms
When trying to connect to a SMA server, the following type of error is displayed, and the connection fails.
▪Linux and UNIX operating systems
cannot map shared memory area 1288077395 to 0x2b0029800000 Cannot connect to target database.
▪Windows operating systems
SQL State "08004"; Native Error Code "25215"; Error Text "SMA failed in MapViewOfFileExt, desired addr: 0000000800000000, got addr: 000000000000000000, error: 6.
Causes
When started, the SMA starts attaching shared memory segments to an address space that is used by another process.
Resolving the problem
In general, the earlier your application connects to the SMA server, the less likely it is that the address space requested by solidDB® is in use.
The SMA server uses the following address spaces by default: