ORA-04030錯誤解決過程一例
今天客戶說從資料庫後台發現報錯,具體如下:
Errors in file /Oracle/bkjia/saptrace/diag/rdbms/bkjia/bkjia/incident/incdir_183218/bkjia_j003_8103_i183218.trc:
ORA-04030: out of process memory when trying to allocate 1052696 bytes (pga heap,log read buffer)
ORA-07445: exception encountered: core dump [kgdsdst()+16] [SIGSEGV] [ADDR:0xFFFFFFFF7FFB4634] [PC:0x1081A1C90] [Address not mapped to object] []
在查看的時候,並沒有發現有什麼語句問題的,檢查系統限制如下:
root@bkjia # ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 29995
virtual memory (kbytes, -v) unlimited
同時,報錯中指出Address not mapped to object,可能存在沒有足夠的交換分區
緊接著,又有如下報錯
Errors in file /oracle/bkjia/saptrace/diag/rdbms/bkjia/bkjia/trace/bkjia_psp0_27454.trc:
ORA-27300: OS system dependent operation:fork failed with status: 12
ORA-27301: OS failure message: Not enough space
ORA-27302: failure occurred at: skgpspawn3
根據官網的介紹如下:
Cause
This issue is mainly caused by lack of memory / swap. Checking the memory configuration on the server, we have found the following
綜合分析,報了04030的錯誤,而下面又分別報了27302及27301的錯誤。根據報錯的意思,一方面,建立會話失敗,另一方面,無法找到映射地址,所以懷疑與交換分區有關
--------------------------------------------------------------------------------
Linux-6-64下安裝Oracle 12C筆記
在CentOS 6.4下安裝Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虛擬機器中安裝步驟
Debian 下 安裝 Oracle 11g XE R2
--------------------------------------------------------------------------------
該資料庫是安裝在solaris11上面的,檢查如下:
root@bkjia # swap -h -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 285,2 8K 4.0G 4.0G
交換分區只有4g,而實體記憶體有40g,顯然過小,應該是由於這個問題引起的
解決辦法就是擴充交換分區,solaris11的調整方法發生了變化,不同以前的版本
root@bkjia:~# zfs set volsize=30g rpool/swap
檢查調整結果:
root@bkjia # swap -h -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 285,2 8K 4.0G 4.0G
/dev/zvol/dsk/rpool/swap 285,2 4.0G 26G 26G
調整完成後,叫繼續跟蹤,結果幾個星期過去後,再也沒有報錯!