DB can't be started due to Memory lack
- Alert log:
- /u01/app/racusr/diag/rdbms/itqedbc10/itqedbc1_1/trace/alert_itqedbc1_1.log
- ORA-00020
- ORA-27102: out of memory
- 1.source sql+.env
ORACLE_SID=itqedbc1_1 ORACLE_HOME=/opt/oracle/ostest/.srchome/ora-12.1.0.1-SUN4V/oradb PATH=$ORACLE_HOME/bin:$PATH:/export/home/oracle/ITQE/Swingbench/swingbench/bin export ORACLE_SID ORACLE_HOME PATH
- eg.
- oracle@itqe-t5260-1-zn1:~$ . sql+.env
- 2.Change sga and process number.
- oracle@itqe-t5260-1-zn1:~$ sqlplus / as sysdba
SQL> alter system set processes=3000 scope=spfile; SQL> alter system set sga_max_size=1020M scope=spfile; SQL> show parameter sga SQL> show parameter memory
-
-
- Note:
- 1.process是针对database 而言的,instance只是db的实例,跑workload的时候会模拟client对db进行频繁的范围这会产生很多进程,但进程数超过就会报这个错.所以process不能设置太小,建议是3000。
- 2.自动SGA,Memory不够了会去自动扩.OS mem free 20G,若sga设置为20g的话,db需要的memory会大于20G,OS不能为db提供大于20g的memory,所以会报错说memory不够了。所以要把sga设置小一些,改到10G左右,sga 几百M也成
- Note:
-
- 3.Restart Database
-------------------------- |Run the following cmd on one node is OK.| |srvctl stop/start database -db dbname | -------------------------- 或者也可以 all stack全重启: ----------------------- |Run the following cmd on two nodes:| |crsctl stop crs | |crsctl start crs | ------------------------ 等价于: ----------------------- |Run the following cmd on one node:| |crsctl stop cluster -all | -----------------------
- Note:
故障排查: 看stack的状态,看db的状态,然后check下日志 ./crsctl stat res -t ./srvctl status database -d itpecdb10 ./srvctl config database -d itpecdb10