Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

free up memory from a dead Oracle process

SOLVED
Go to solution
Stefan Schulz
Honored Contributor

free up memory from a dead Oracle process

Hi all,

i have a Oracle 9iv2 running with two instances. Something happend during the startup of the second instance.

Unfortunately it still consumes a lot of memory, but there no process connectet to the memory as far as i see.

The output from UNIX95=1 ps -eo vsz,ruser,pid,args | sort -rn | head -20 shows large memory segments allocated by a process ID 25902.

But there is no such process anymore. It was there at the beginning, but somhow this process is gone now.

How can i free up this allocated memory without rebooting the server or restarting oracle. We are in our normal buisness hours right now and the first instance is productive.

Kind regards

Stefan
No Mouse found. System halted. Press Mousebutton to continue.
11 REPLIES
Stefan Schulz
Honored Contributor

Re: free up memory from a dead Oracle process

Sorry i ment to say the output from ipcs -bmop|sort -rnk8

Here ist what ipcs -bmop|sort -rnk8 shows:

m 72709 0xc795e2f0 --rw-rw---- oracle dba 209 2434244608 12538 26805
m 282116 0x00000000 --rw-rw---- oracle dba 0 1224736768 25902 25902
m 11271 0x00000000 --rw-rw---- oracle dba 0 620756992 25902 25902
m 3080 0x00000000 --rw-rw---- oracle dba 0 167772160 25902 25902
m 4105 0x00000000 --rw-rw---- oracle dba 0 50331648 25902 25902
m 1896619018 0x00000000 --rw-rw---- oracle dba 0 33554432 25902 25902
m 31901702 0x431c78ac --rw-rw-rw- daemon daemon 1 5767168 22224 22220
m 1 0x4e0c0002 --rw-rw-rw- root root 1 61760 627 627
m 2 0x4120138b --rw-rw-rw- root root 1 8192 627 639
m 21507 0x5e10007f --rw------- root root 1 512 2099 2099
m 0 0x411c0262 --rw-rw-rw- root root 0 348 627 627
T ID KEY MODE OWNER GROUP NATTCH SEGSZ CPID LPID
Shared Memory:
IPC status from /dev/kmem as of Fri Jul 15 11:04:37 2005

The topmost result is from the first instance. This entry is ok. The problem are the following entries with the reference to the process ID 25902.

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Yogeeraj_1
Honored Contributor

Re: free up memory from a dead Oracle process

hi stefan,

ps -ef|grep 25902 should give you hint on the specific process.

you can further analyse the process activity using glance.

hope this helps!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: free up memory from a dead Oracle process

hi again,

you can also know if the process 25902 belongs to the running instance or not - by running the following query:
select b.sid SID,b.serial# "Serial#", c.spid "srvPID", b.osuser, b.username, b.status, b.client_info from v$session b, v$process c where b.paddr = c.addr and c.sPID = 25902


hope this helps too!
regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Stefan Schulz
Honored Contributor

Re: free up memory from a dead Oracle process

Hi yogeeraj,

unfortunately this process isn't there anymore. ps -ef | grep 25902 doesn't show a running process.

Also normally oracle processes are linked to the instance name. But also there is no process with an reference to the second instance. Only this process 25902 had an reference to the second instance befor it disappeared.

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Stefan Schulz
Honored Contributor

Re: free up memory from a dead Oracle process

Hi again yogeeraj,

this process is not belonging to the first instance. Your select returns with "No rows selected".

I can't run this select on the second instance because its not running. And i don't want to start it up during buisiness hours as it seems that the last startupattempt failed and locked my memory.

What else can i do?

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Yogeeraj_1
Honored Contributor

Re: free up memory from a dead Oracle process

hi,

so at the database level, we cannot do much...

maybe at the OS level, we can try something..

thinking...

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor
Solution

Re: free up memory from a dead Oracle process

hi again,

do you have metalink access?
check note: 115235.1 - "Resolving ORA-7279 or ORA-27146 errors when starting instance"

it mentions about semaphores from the "crashed instance" which may still be allocated and that needs to be removed and how to do it.

hope this helps!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Stefan Schulz
Honored Contributor

Re: free up memory from a dead Oracle process

Hi again,

thank you very much. You saved my day!

This metalink article pointed to the right direction. And i allready had the information i needed (from above ipcs command) to free this memory. I just didn't recognize how close i allready was.

It turned out that i had some hanging shared memory allocations. Not semaphores like in the metalink article mentioned.

But using ipcrm -m with the id i allready had did the trick.

The memory is freed without disturbing the production instance.

Thanks a lot for your help.

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Yogeeraj_1
Honored Contributor

Re: free up memory from a dead Oracle process

hi stefan,

great that you managed to fix it!

Thank also metalink. whenever, i have doubts, i go there first! Tons of information available there. We are lucky enough to afford such a facility!

cheers
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
generic_1
Respected Contributor

Re: free up memory from a dead Oracle process

Keep oracle patched too :).
Stefan Schulz
Honored Contributor

Re: free up memory from a dead Oracle process

i know metalink is a really good resource. Unfortunately sometimes i miss to find the right words to search for.

And as metalink is no person i can talk to its sometimes difficult to retrieve the necessary information.

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.