部署一台新服务器,信号量报错,观察也没有key冲突,错误分析及解决如下:

创建一个不存在的信号量集返回参数错误的报错,因为信号量集的信号量数量超过了系统限制。
系统默认
/home/poc#ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 100
semaphore max value = 32767
信号量的配置文件路径   /etc/sysctl.conf
kernel.sem配置项
直接修改配置文件不会立即生效,调用sysctl命令可以修改文件并刷新系统配置
sysctl -w kernel.sem="40960 2048000  40960  20480"
/home/poc#ipcs -ls

------ Semaphore Limits --------
max number of arrays = 20480
max semaphores per array = 40960
max semaphores system wide = 2048000
max ops per semop call = 40960
semaphore max value = 32767 

相关文章:

  • 2022-12-23
  • 2021-04-10
  • 2022-12-23
  • 2021-12-04
  • 2021-06-01
  • 2021-12-31
  • 2021-11-19
  • 2021-10-28
猜你喜欢
  • 2021-08-26
  • 2021-10-18
  • 2021-07-28
  • 2021-12-08
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案