欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

ORA-04030错误解决过程一例

程序员文章站 2022-05-08 13:22:42
...

综合分析,报了04030的错误,而下面又分别报了27302及27301的错误。根据报错的意思,一方面,创建会话失败,另一方面,无法找到映

今天客户说从数据库后台发现报错,具体如下:

Errors in file /Oracle/linuxidc/saptrace/diag/rdbms/linuxidc/linuxidc/incident/incdir_183218/linuxidc_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@linuxidc # 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/linuxidc/saptrace/diag/rdbms/linuxidc/linuxidc/trace/linuxidc_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@linuxidc # swap -h -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 285,2 8K 4.0G 4.0G

交换分区只有4g,而物理内存有40g,显然过小,应该是由于这个问题引起的

解决办法就是扩展交换分区,solaris11的调整方法发生了变化,不同以前的版本

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

检查调整结果:

root@linuxidc # 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

调整完成后,叫继续跟踪,结果几个星期过去后,再也没有报错!