由于业务量增长,生产环境的数据库服务器需要扩容,需要把原本512GB 的内存扩大到了1024GB, 在此基础上需要 调整SGA 的大小和连接数,以便分配更多的缓存。计划调整SGA为400g,PGA调整为250g,连接数调整为40000。
SQL> startup
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemid2
ORA-27303: additional information: maxsems = 304, verify_semcnt = 0
显示的是空间的问题,我检查了空间情况,没有发现什么异常。用 free -m 检查内存的使用情况,还有很多的空余内存。
2.1 错误分析
Errors in file u01/app/oracle/diag/rdbms/orc19/orc19/trace/orc19_ora_3994.trc:
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemid2
ORA-27303: additional information: maxsems = 304, verify_semcnt = 0
2.2 逐一检查参数检查
2.3 MOS资料查找
Changes
Attempted startup of a newly created database instance.
Cause
The error occurs due to the exhaustion of total number of semaphore sets/arrays.
Solution
Overview
Semaphores are an interprocess communication (IPC) locking/synchronisation mechanism allowing processes/threads to interoperate and coordinate their activity.
Various processes on a system require and utilise semaphores, therefore sufficient semaphores must be configured for the intended use case.
One kernel parameter, kernel.sem, is used to configure multiple system semaphore settings i.e.
kernel.sem = <semmsl> <semmns> <semopm> <semmni>
2.4 测试验证参数
[root@localhost ~]# cat /etc/sysctl.conf |grep sem
kernel.sem = 250 32000 100 128
SQL> alter system set processes=20000 scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 4288M
ORA-01078: failure in processing system parameters
[root@localhost ~]# cat /etc/sysctl.conf |grep sem
kernel.sem = 250 1200 100 128
SQL> startup nomount pfile='/home/oracle/pfile.ora'
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpcreates
[root@localhost ~]# cat /etc/sysctl.conf |grep sem
kernel.sem = 250 3000 100 128
SQL> startup nomount
ORACLE instance started.
Total System Global Area 3925867552 bytes
Fixed Size 8903712 bytes
Variable Size 2147483648 bytes
Database Buffers 1761607680 bytes
Redo Buffers 7872512 bytes
[root@localhost ~]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x5381ac88 557056 oracle 600 250
0x5381ac89 589825 oracle 600 250
0x5381ac8a 622594 oracle 600 250
0x5381ac8b 655363 oracle 600 250
0x5381ac8c 688132 oracle 600 250
0x5381ac8d 720901 oracle 600 250
0x5381ac8e 753670 oracle 600 250
0x5381ac8f 786439 oracle 600 250
0x5381ac90 819208 oracle 600 250
总 结:

本文作者:胡 伟 (上海新炬中北团队)
本文来源:“IT那活儿”公众号

文章转载自IT那活儿,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




