LPC 1.2.0 Linux failed to access shared memory

LPC 1.2.0 Linux install.
The client met the 'Failed to access shared memory' issue when tried to start the lpc, It failed from time to time.
Is there recommended approach to check and configure the shared memory for LPC launching?

1647401747521.png

Tagged:

Best Answer

  • Jirapongse
    Answer ✓

    @Frederic

    The shared memory key may be used by another process. You can verify the shared memory key used by LPC in the lpc.cnf.

    !!
    !!      Shared memory configuration
    !!
    *maxSemaphores : 6
    *admin*maxClients : 10
    *lpc*admin*semaphoreKey : 90
    *lpc*admin*sharedMemoryKey : 90
    *lpc*admin*sharedMemorySize : 1000000
    *lpc*admin*enableChildStats : False
    *lpc*admin*enableRootStats : True
    *lpc*admin*enableMemoryStats : True

    You can run the ipcs command to verify the used shared memory key.

    [root@1a0c6c8cf009 config]# ipcs

    ------ Message Queues --------
    key        msqid      owner      perms      used-bytes   messages

    ------ Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status
    0x0000005a 0 root 664 1000432 1


    ------ Semaphore Arrays --------
    key        semid      owner      perms      nsems
    0x0000005a 0          root       666        6

    0x0000005a is a hexadecimal number of 90.

    You can change the number of sharedMemoryKey in the LPC configuration file.

    Otherwise, you may verify if another LPC process is running on the machine.