記一次ora-04030錯誤的處理過程

datapeng發表於2014-06-25

      今天客戶說從資料庫後臺發現報錯,具體如下:

Errors in file /oracle/mytest/saptrace/diag/rdbms/mytest/mytest/incident/incdir_183218/mytest_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] []

在檢視的時候,並沒有發現有什麼語句問題的,檢查系統限制如下:

# 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/mytest/saptrace/diag/rdbms/mytest/mytest/trace/mytest_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的錯誤。根據報錯的意思,一方面,建立會話失敗,另一方面,無法找到對映地址,所以懷疑與交換分割槽有關

該資料庫是安裝在solaris11上面的,檢查如下:

# swap -h -l
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 285,2        8K     4.0G     4.0G

交換分割槽只有4g,而實體記憶體有40g,顯然過小,應該是由於這個問題引起的

解決辦法就是擴充套件交換分割槽,solaris11的調整方法發生了變化,不同以前的版本

:~# zfs set volsize=30g rpool/swap

檢查調整結果:

# 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

調整完成後,叫繼續跟蹤,結果幾個星期過去後,再也沒有報錯!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29371470/viewspace-1193559/,如需轉載,請註明出處,否則將追究法律責任。

相關文章