oracle报4030错误,开了SR,oracle回复测试主机的内存分配情况,经测试内存分配没有问题。
1. Detect whether 3.5GB memory can be allocated by oracle account
1)Save the program as mem.c
+++++++++++++
/* mem.c */
#include <stdio.h>
#include <errno.h>
main()
{
long int i;
i = 1;
for(;;)
{
if (!malloc(1048576))
{
printf("malloc failed with error: %u at iteration %u\n", errno,i);
exit(-1);
}
i++;
printf("allocated %u M of memory\n", i);
if ((i*1048576) >= 3758096384) {
printf ("Leaving...\n");
exit(0);
}
}
}
+++++++++++++
2) compile it with this command
gcc -maix64 -o ./mem ./mem.c
3)run this program:
chmod 777 ./mem
./mem
2. AIX
There should be some limit on running memory of process besides limits.
There is a tool can detect resource limit of a running process on AIX, but can’t obtain it unless contact IBM support.
Please try contacting IBM support if test on mem.c failed with memory allocating.
Oracle的SR转到欧洲,建议改应用用户的limits资源,修改后经测试没有再报此问题。
结论:应用用户的limits资源问题导致。
附oracle的回复:
=== ODM Action Plan ===
Conform with file szbi2_ora_328230.trc the process failing is allocating only 180M at error time, while has been showed that the oracle user can allocate more than 3Gb without errors. It indicates there is a configuration problem, no leak of memory or bug, but a configuration problem at OS level, probably at user level.
The process failing is:
O/S info: user: dssadmin, term: , ospid: 290830, machine: p5702
program: bi_exec@p5702 (TNS V1-V3)
So, the process is connecting through SQL*Net, and the user connected to the machine is dssadmin, not oracle
1. The user dssadmin MUST have the same limits than the oracle user
2. The user which started the listener MUST have the same limits than the oracle user
Please perform the following:
1. Put the following entry in /etc/security/limits the following for the users oracle and dssadmin:
oracle:
fsize = -1
core = -1
cpu = -1
data = =-1
stack = -1
rss = -1
nofiles = -1
core_hard=-1
cpu_hard=-1
data_hard=-1
fsize_hard=-1
dssadmin:
fsize = -1
core = -1
cpu = -1
data = =-1
stack = -1
rss = -1
nofiles = -1
core_hard=-1
cpu_hard=-1
data_hard=-1
fsize_hard=-1
2. Restart the database and the listener with the oracle user and check if the error has disappeared.