当前位置:网站首页>semget No space left on device

semget No space left on device

2022-06-25 14:59:00 qq_ twenty-three million nine hundred and fifty-three thousand

When semaphores are recently used , call semget Failure , adopt strerror Check that the error report is No space left on device

To locate this problem , First, you need to know some system commands
ipcs -m   View system shared memory information
ipcs -q   View system message queue information
ipcs -s   Check the system semaphore information

cat /prc/sys/kernel/sem perhaps ipcs -ls You can view the semaphore information supported by the current system
cat /proc/sys/kernel/sem
250 32000 32 128

250 SEMMSL max semaphores per array The signal set holds the maximum number of signals
32000 SEMMNS max semaphores system wide The maximum number of all signals
32 SEMOPM max ops per semop call Call the maximum number of signals in a single signal set
128 SEMMNI max number of arrays The maximum value of the signal set

Here is the semaphore creation failure , So just look at ipcs -s that will do , Use in question ipcs Command to view the semaphore number , Discovery was created 128 individual , And the most semaphore creation number it supports is 128, Therefore, subsequent semaphore creation fails
 Insert picture description here

Solution :
Carry out orders echo 32000 1024000000 500 32000 >/proc/sys/kernel/mem, Increase the maximum value of the semaphore that can be created

原网站

版权声明
本文为[qq_ twenty-three million nine hundred and fifty-three thousand ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200514581930.html