Today I have faced CHECK TIMED OUT and INTERMEDIATE state errors in listener and ASM disk group services. Then I have started investigation we found "ORA-04031: unable to allocate 3896 bytes of shared memory" error in ASM alert log file.
Sat Aug 23 11:23:00 2014
Errors in file /u01/app/oracle/diag/asm/+asm/+ASM2/trace/+ASM2_ora_26804658.trc (incident=19712):
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared pool","SELECT value FROM v$paramete...","sga heap(1,0)","kglsim object batch")
Use ADRCI or Support Workbench to package the incident.
bash-4.2$ crsctl stat res -t
---------------------------------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS Local Resources
---------------------------------------------------------------------------------------------------------
ora.DATA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.FRA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.LISTENER.lsnr
ONLINE ONLINE PRODDB1
ONLINE INTERMEDIATE PRODDB2 Not All Endpoints Registered
ora.OCRVD.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.asm
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE ONLINE PRODDB2 Started
ora.gsd
OFFLINE OFFLINE PRODDB1
OFFLINE OFFLINE PRODDB2
ora.net1.network
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.ons
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.registry.acfs
ONLINE ONLINE PRODDB1
ONLINE UNKNOWN PRODDB2
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE PRODDB1
ora.cvu
1 ONLINE ONLINE PRODDB1
ora.PRODDB1.vip
1 ONLINE ONLINE PRODDB1
ora.PRODDB2.vip
1 ONLINE ONLINE PRODDB2
ora.ehishyd.db
1 ONLINE ONLINE PRODDB1 Open
2 ONLINE ONLINE PRODDB2 Open
ora.oc4j
1 ONLINE ONLINE PRODDB2
ora.scan1.vip
1 ONLINE ONLINE PRODDB1
bash-4.2$
bash-4.2$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.FRA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.LISTENER.lsnr
ONLINE ONLINE PRODDB1
ONLINE OFFLINE PRODDB2
ora.OCRVD.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.asm
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE ONLINE PRODDB2 Started
ora.gsd
OFFLINE OFFLINE PRODDB1
OFFLINE OFFLINE PRODDB2
ora.net1.network
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.ons
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.registry.acfs
ONLINE ONLINE PRODDB1
ONLINE UNKNOWN PRODDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE PRODDB1
ora.cvu
1 ONLINE ONLINE PRODDB1
ora.PRODDB1.vip
1 ONLINE ONLINE PRODDB1
ora.PRODDB2.vip
1 ONLINE ONLINE PRODDB2
ora.ehishyd.db
1 ONLINE ONLINE PRODDB1 Open
2 ONLINE ONLINE PRODDB2 Open
ora.oc4j
1 ONLINE ONLINE PRODDB2
ora.scan1.vip
1 ONLINE ONLINE PRODDB1
bash-4.2$
I came to know that its an ASM instance memory related issue. Checked below memory parameters in ASM instance.
SQL> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
sga_max_size big integer 272M
sga_target big integer 0
SQL>
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_max_target big integer 272M
memory_target big integer 272M
SQL>
Automatic memory management is enabled by default on an Oracle ASM instance and oracle recommends that to use Automatic Memory Management (AMM) for ASM. In Oracle 11gR2 the default value used for MEMORY_TARGET is 272 MB. Here SGA_TARGET is 256MB and 16MB is for PGA_TARGET.
Based on "ORA-04031: unable to allocate 3896 bytes of shared memory" error I get to know that ASM memory parameters in ASM instances are too low and it results in ORA-04031 in the ASM instance.
Based on Oracle Doc ID 437924.1, I have incresed memory_max_target to 4096M and memory_target to 1536M. Then I restarted the ASM instances.
SQL> alter system set memory_max_target=4096M scope=spfile;
SQL> alter system set memory_target=1536M scope=spfile;
After changing above parameters the services came to ONLINE state.
bash-4.2$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.FRA.dg
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.LISTENER.lsnr
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.OCRVD.dg
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.asm
ONLINE ONLINE PRODDB1 Started
ONLINE ONLINE PRODDB2 Started
ora.gsd
OFFLINE OFFLINE PRODDB1
OFFLINE OFFLINE PRODDB2
ora.net1.network
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.ons
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.registry.acfs
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE PRODDB2
ora.cvu
1 ONLINE ONLINE PRODDB2
ora.PRODDB1.vip
1 ONLINE ONLINE PRODDB1
ora.PRODDB2.vip
1 ONLINE ONLINE PRODDB2
ora.ehishyd.db
1 ONLINE ONLINE PRODDB1 Open
2 ONLINE ONLINE PRODDB2 Open
ora.oc4j
1 ONLINE ONLINE PRODDB2
ora.scan1.vip
1 ONLINE ONLINE PRODDB2
bash-4.2$
Hope this will help you.. :)
Best Regards,
Chowdari.
Sat Aug 23 11:23:00 2014
Errors in file /u01/app/oracle/diag/asm/+asm/+ASM2/trace/+ASM2_ora_26804658.trc (incident=19712):
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared pool","SELECT value FROM v$paramete...","sga heap(1,0)","kglsim object batch")
Use ADRCI or Support Workbench to package the incident.
bash-4.2$ crsctl stat res -t
---------------------------------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS Local Resources
---------------------------------------------------------------------------------------------------------
ora.DATA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.FRA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.LISTENER.lsnr
ONLINE ONLINE PRODDB1
ONLINE INTERMEDIATE PRODDB2 Not All Endpoints Registered
ora.OCRVD.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.asm
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE ONLINE PRODDB2 Started
ora.gsd
OFFLINE OFFLINE PRODDB1
OFFLINE OFFLINE PRODDB2
ora.net1.network
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.ons
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.registry.acfs
ONLINE ONLINE PRODDB1
ONLINE UNKNOWN PRODDB2
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE PRODDB1
ora.cvu
1 ONLINE ONLINE PRODDB1
ora.PRODDB1.vip
1 ONLINE ONLINE PRODDB1
ora.PRODDB2.vip
1 ONLINE ONLINE PRODDB2
ora.ehishyd.db
1 ONLINE ONLINE PRODDB1 Open
2 ONLINE ONLINE PRODDB2 Open
ora.oc4j
1 ONLINE ONLINE PRODDB2
ora.scan1.vip
1 ONLINE ONLINE PRODDB1
bash-4.2$
bash-4.2$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.FRA.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.LISTENER.lsnr
ONLINE ONLINE PRODDB1
ONLINE OFFLINE PRODDB2
ora.OCRVD.dg
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE INTERMEDIATE PRODDB2 CHECK TIMED OUT
ora.asm
ONLINE INTERMEDIATE PRODDB1 CHECK TIMED OUT
ONLINE ONLINE PRODDB2 Started
ora.gsd
OFFLINE OFFLINE PRODDB1
OFFLINE OFFLINE PRODDB2
ora.net1.network
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.ons
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.registry.acfs
ONLINE ONLINE PRODDB1
ONLINE UNKNOWN PRODDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE PRODDB1
ora.cvu
1 ONLINE ONLINE PRODDB1
ora.PRODDB1.vip
1 ONLINE ONLINE PRODDB1
ora.PRODDB2.vip
1 ONLINE ONLINE PRODDB2
ora.ehishyd.db
1 ONLINE ONLINE PRODDB1 Open
2 ONLINE ONLINE PRODDB2 Open
ora.oc4j
1 ONLINE ONLINE PRODDB2
ora.scan1.vip
1 ONLINE ONLINE PRODDB1
bash-4.2$
I came to know that its an ASM instance memory related issue. Checked below memory parameters in ASM instance.
SQL> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
sga_max_size big integer 272M
sga_target big integer 0
SQL>
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_max_target big integer 272M
memory_target big integer 272M
SQL>
Automatic memory management is enabled by default on an Oracle ASM instance and oracle recommends that to use Automatic Memory Management (AMM) for ASM. In Oracle 11gR2 the default value used for MEMORY_TARGET is 272 MB. Here SGA_TARGET is 256MB and 16MB is for PGA_TARGET.
Based on "ORA-04031: unable to allocate 3896 bytes of shared memory" error I get to know that ASM memory parameters in ASM instances are too low and it results in ORA-04031 in the ASM instance.
Based on Oracle Doc ID 437924.1, I have incresed memory_max_target to 4096M and memory_target to 1536M. Then I restarted the ASM instances.
SQL> alter system set memory_max_target=4096M scope=spfile;
SQL> alter system set memory_target=1536M scope=spfile;
After changing above parameters the services came to ONLINE state.
bash-4.2$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.FRA.dg
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.LISTENER.lsnr
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.OCRVD.dg
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.asm
ONLINE ONLINE PRODDB1 Started
ONLINE ONLINE PRODDB2 Started
ora.gsd
OFFLINE OFFLINE PRODDB1
OFFLINE OFFLINE PRODDB2
ora.net1.network
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.ons
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
ora.registry.acfs
ONLINE ONLINE PRODDB1
ONLINE ONLINE PRODDB2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE PRODDB2
ora.cvu
1 ONLINE ONLINE PRODDB2
ora.PRODDB1.vip
1 ONLINE ONLINE PRODDB1
ora.PRODDB2.vip
1 ONLINE ONLINE PRODDB2
ora.ehishyd.db
1 ONLINE ONLINE PRODDB1 Open
2 ONLINE ONLINE PRODDB2 Open
ora.oc4j
1 ONLINE ONLINE PRODDB2
ora.scan1.vip
1 ONLINE ONLINE PRODDB2
bash-4.2$
Hope this will help you.. :)
Best Regards,
Chowdari.
Addressing the ORA-04031 error and successfully allocating the required memory of 3896 bytes is commendable. Nice Travel Apps Keep up the excellent work in ensuring smooth and efficient database operations.
ReplyDelete