重庆思庄Oracle、Redhat认证学习论坛

标题: mmap(offset=217747456, len=4096) failed with errno=12 for the file oraclexxx [打印本页]

作者: 郑全    时间: 2021-12-24 15:20
标题: mmap(offset=217747456, len=4096) failed with errno=12 for the file oraclexxx
ORA-04030 (callheap,ioc_nread_clob2) (Doc ID 1929790.1)               

In this Document
Symptoms
Cause
Solution
References

APPLIES TO:
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
ORA-04030: out of process memory when trying to allocate 65080 bytes (callheap,ioc_nread_clob2)

in alert log


CAUSE
OS limitation.

ORA-04030 trace file shows the system was running out of map entries:

mmap(offset=170967040, len=4096) failed with errno=12 for the file <FILENAME>
mmap(offset=170967040, len=4096) failed with errno=12 for the file <FILENAME>
mmap(offset=170967040, len=4096) failed with errno=12 for the file <FILENAME>


SOLUTION
1.Increase the amount of memory an UNIX process can request and use from the operating system. Set the ulimit value to UNLIMITED for the OS user that owns Oracle software (oracle):

stack --> UNLIMITED
data --> UNLIMITED

For more information please refer to:
NOTE:188149.1 How to Display and Change UNIX Process Resource Limits

Check that the OS user that started the listener process has the same limits.

NOTE: Any change to UNIX limits will not take effect until the database and listener are bounced. In other words, restart the database and listener after making any change to UNIX limits. Before restarting the database and listener check the limit values for oracle user to see if they were changed.

2. These errors usually show up because of running out of map entries from the OS. There are only 65536 memory map entries per process.

Change the page count at the OS level:

$ more /proc/sys/vm/max_map_count
$ sysctl -w vm.max_map_count=200000

-- OR --

Adjust the realfree heap pagesize within the database by setting the following parameters in the init/spfile and restart the database.

_use_realfree_heap=TRUE
_realfree_heap_pagesize_hint = 262144

Set:

ALTER SYSTEM SET "_use_realfree_heap"=TRUE SCOPE=SPFILE;
ALTER SYSTEM SET "_realfree_heap_pagesize_hint"=262144 SCOPE=SPFILE;


and restart the instance.



NOTE: In Oracle 12c, the parameter _realfree_heap_pagesize_hint is changed to _realfree_heap_pagesize.
In 12C, _realfree_heap_pagesize = 262144

REFERENCES
NOTE:188149.1 - How to Display and Change UNIX Process Resource Limits
NOTE:443746.1 - Automatic Memory Management (AMM) on 11g & 12c
NOTE:1325100.1 - PLSQL Procedure Causing ORA-04030: (pga heap,control file i/o buffer) And ORA-04030: (koh-kghu sessi,pmuccst: adt/record) or ORA-04030: (koh-kghucall ,pmucalm coll) Errors







欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2