ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

could not create semaphores: No space left on device

2021-08-31 11:32:45  阅读:206  来源: 互联网

标签:semaphores space max could system 信号量 SEMMSL 50100


在postgres中,当max_connect设置过大,启动的时候会报错:

FATAL:  could not create semaphores: No space left on device

创建semaphores时空间参数不够,查询官网,有这么一段解释:

HINT:  This error does *not* mean that you have run out of disk space.  It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded.  You need to raise the respective kernel parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its max_connections parameter.
The PostgreSQL documentation contains more information about configuring your system for PostgreSQL.
解决的方法是改小max_connect,当业务不允许的情况下,修改内核参数,max_connect相关的内核参数有:

 

 下面介绍如何修改内核参数

复制代码
# ipcs -ls
 
------ Semaphore Limits --------
max number of arrays = 1280
max semaphores per array = 50100
max semaphores system wide = 64128000
max ops per semop call = 50100
semaphore max value = 32767
 
 
# cat  /proc/sys/kernel/sem
SEMMSL   SEMMNS         SEMOPM  SEMMNI
50100   128256000       50100   2560
复制代码 SEMMSL 每个信号量set中信号量最大个数 SEMMNS linux系统中信号量最大个数 SEMOPM semop系统调用允许的信号量最大个数设置,设置成和SEMMSL一样即可 SEMMNI  linux系统信号量set最大个数   所以SEMMNS=SEMMSL*SEMMNI 修改 vi /etc/sysctl.conf 的以下参数 kernel.sem = 50100 128256000 50100 2560 sysctl -p生效 重启数据库即可 但行好事,莫问前程

标签:semaphores,space,max,could,system,信号量,SEMMSL,50100
来源: https://www.cnblogs.com/qiumingcheng/p/15209496.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有