PGSQL优化后出错could not create semaphores: No space

在对PostgreSQL进行参数优化后,启动服务时出现'could not create semaphores: No space left on device'错误。这并非磁盘空间不足,而是系统限制了最大连接数。解决方案是调整内核参数,如kernel.sem,并重新加载配置。通过增加共享内存等参数,可以解决这个问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

服务器32G内存空间

 

参数优化

$ vi postgresql.conf

shared_buffers = 3072MB

max_connections = 4000

work_mem = 4MB

effective_cache_size = 4GB

maintenance_work_mem = 512MB 

wal_buffers = 256

 

具体优化参数解释参考:https://blog.youkuaiyun.com/zhousenshan/article/details/70233820

 

启动服务出错

$ pg_ctl -D /data/pg_data start

server starting

$ LOG:  could not create IPv6 socket: Address family not supported by protocol

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

DETAIL:  Failed system call was semget(5432124, 17, 03600).

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值