Operating System - HP-UX
1820694 Members
2678 Online
109627 Solutions
New Discussion юеВ

Problem with SAP not releasing shared memory segments

 
Adam Noble
Super Advisor

Problem with SAP not releasing shared memory segments

Hi all,

I wonder if anyone has seen this before. We have had the same problem on a number of SAP systems recently. We have made no changes on the OS and I am told (mmm!!!) no changes have been made on the application. Basically when SAP is shutdown it does not release the shared memory segments on the system and they appear in a De-activated state! We therefore cannot release them with an ipcrm command. This means we have to re-boot the server in order to be able to get SAP to start as it can't allocate sufficient shared memory. Has anybody seen symptoms like this before?

Cheers
4 REPLIES 4
Hein van den Heuvel
Honored Contributor

Re: Problem with SAP not releasing shared memory segments

Sounds like there would be a process still attached after sap shutdown.

When you issue ipcs -m after the shutdown,
- what does the NATTCH column indicate?
- what does ps -ef | grep sap show?

fwiw,
Hein.
Adam Noble
Super Advisor

Re: Problem with SAP not releasing shared memory segments

The NATTCH column shows 1 for all de-activated processes. I can't confirm as we have re-booted but believe its possible that processes were still on the system but in a zombie state. The problem is the processes can bot be killed and therefore the memory can't be released.
A. Clay Stephenson
Acclaimed Contributor

Re: Problem with SAP not releasing shared memory segments

If you do a man shmctl (the system call that underlies ipcrm -m) and read the section that pertains to IPC_RMID, you will find that the behavior is analogous to that of unlink()ing a file. ie, the file is not actually removed until all the processes which have the file open eith close() the file or terminate. Similarly, shared memory segements aren't actually removed until all processes which have them attached either detach them or terminate. The solution to your problem is identical to that of your earlier posting. Find what is causing your processes not to terminate properly and you will solve your shared memory problems as a side effect.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Problem with SAP not releasing shared memory segments

As Clay mentioned, your shutdown procedure is defective. You and your DBA must examine all parts of the SAP and database shutdown procedure and determine where the missing or incorrect step is located. NOTE: any step with a kill -9 is very likely wrong.


Bill Hassell, sysadmin