Содержание
- UNABLE TO START INSTANCE WITH LARGE SGA ORA-27102 SVR4 ERROR: 22: INVALID ARGUMENT (Doc ID 790205.1)
- Applies to:
- Symptoms
- Changes
- Cause
- To view full details, sign in with your My Oracle Support account.
- Don’t have a My Oracle Support account? Click to get started!
- Svr4 error 22 invalid argument
- YET ANOTHER ORACLE DBA
- Focus on Oracle DBA (Core/Apps/Fusion) stuffs
- Categories
- Archives
- Blogroll
- Disclaimer
- Blog Stats
- ORA-27102: Out Of Memory And SVR4 Error: 22: Invalid argument During Startup On Solaris10 Server
- Pavan DBA’s Blog
- The DBA Knowledge Store
- Email Subscription
- Visitor Count
- Categories
- Vote your opinion…
- TechMaster Training
- My Facebook Page
- My Tweets
- My DBA links
- Other DBA Blogs
- how to resolve ORA-27102 error?
- Database Startup On Solaris 10 Fails With Ora-27102 Out Of Memory Error (Doc ID 399895.1)
- Applies to:
- Changes
- Cause
- To view full details, sign in with your My Oracle Support account.
- Don’t have a My Oracle Support account? Click to get started!
UNABLE TO START INSTANCE WITH LARGE SGA ORA-27102 SVR4 ERROR: 22: INVALID ARGUMENT (Doc ID 790205.1)
Last updated on JANUARY 30, 2022
Applies to:
Oracle Database — Enterprise Edition — Version 10.1.0.2 to 10.2.0.5 [Release 10.1 to 10.2]
Oracle Database Cloud Schema Service — Version N/A and later
Oracle Database Exadata Express Cloud Service — Version N/A and later
Oracle Database Exadata Cloud Machine — Version N/A and later
Oracle Cloud Infrastructure — Database Service — Version N/A and later
Oracle Solaris on SPARC (64-bit)
Sun Solaris SPARC (64-bit)
Oracle Server Enterprise Edition — Version: 10.1.0.2 to 10.2.0.5
On 10.2.0.3 DB version on Solaris 10 SPARC 64-bit
Symptoms
On Solaris 10 when the SGA is large (greater than 4G)
When trying to shutdown and startup the DB in the same session receive the below errors:
SQL*Plus: Release — Production on Sat Apr 26 23:59:14 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> Connected.
SQL> ORACLE instance shut down.
SQL> ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
SQL> ORA-01012: not logged on
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 —
64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
WARNING: EINVAL creating segment of size 0x0000000100004000 (transalates to 4GB)
fix shm parameters in /etc/system or equivalent
Changes
On Solaris 10 , when SGA is >4G
Cause
To view full details, sign in with your My Oracle Support account.
Don’t have a My Oracle Support account? Click to get started!
In this Document
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.
Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us | |
|
| Legal Notices | Terms of Use
Источник
Svr4 error 22 invalid argument
As part of a database tuning effort you increase the SGA/PGA sizes; and Oracle greets you with an ORA-27102: out of memory error message. However the system had enough free memory to serve the needs of Oracle.
Not so helpful. If you look at the alert log for some clues.
Oracle is trying to create a 10G shared memory segment (depends on SGA/PGA sizes), but operating system (Solaris in this example) responded with an invalid argument (EINVAL) error message. There is a little hint about setting shm parameters in /etc/system .
Prior to Solaris 10, shmsys:shminfo_shmmax parameter has to be set in /etc/system with maximum memory segment value that can be created. 8M is the default value on Solaris 9 and prior versions; whereas 1/4th of the physical memory is the default on Solaris 10 and later. On a Solaris 10 (or later) system, it can be verified as shown below:
It is clear that the system is using the default value of 8G in this scenario, where as the application (Oracle) is trying to create a memory segment (10G) larger than 8G. Hence the failure.
The solution is to configure the system with a value large enough for the shared segment being created, so Oracle succeeds in starting up the database instance.
On Solaris 9 and prior releases, it can be done by adding the following line to /etc/system , followed by a reboot for the system to pick up the new value.
set shminfo_shmmax = 0x000000028a006000
However shminfo_shmmax parameter was obsoleted with the release of Solaris 10; and Sun doesn’t recommend setting this parameter in /etc/system even though it works as expected.
On Solaris 10 and later, this value can be changed dynamically on a per projecSQL> startup ORACLE instance started. Total System Global Area 1.0905E+10 bytes Fixed Size 1316080 bytes Variable Size 4429966096 bytes Database Buffers 6442450944 bytes Redo Buffers 31457280 bytes Database mounted. Database opened.t basis with the help of resource control facilities . This is how we do it on Solaris 10 and later:
Note that changes made with the prctl command on a running system are temporary, and will be lost when the system is rebooted. To make the changes permanent, create a project with projadd command and associate it with the user account as shown below:
Finally make sure the project is created with projects -l or cat /etc/project commands.
With these changes, Oracle would start the database up normally.
Источник
YET ANOTHER ORACLE DBA
Focus on Oracle DBA (Core/Apps/Fusion) stuffs
Categories
- Apps 11i/R12 (52)
- Autoconfig (2)
- Certification (3)
- Cloning (1)
- Conc.Mgr (9)
- Diagnostics (1)
- How to (19)
- Patching (3)
- Troubleshooting (12)
- Database (37)
- Cloning (1)
- Features (10)
- How to (8)
- Performance (2)
- RMAN (4)
- Troubleshooting (8)
- Tuning (2)
- Upgrade (1)
- Linux (8)
- Scripts (5)
- Uncategorized (246)
Archives
- September 2011 (5)
- August 2011 (12)
- July 2011 (6)
- June 2011 (7)
- May 2011 (3)
- April 2011 (3)
- March 2011 (9)
- February 2011 (6)
- January 2011 (5)
- December 2010 (1)
- November 2010 (3)
- October 2010 (1)
- September 2010 (3)
- August 2010 (1)
- July 2010 (2)
- June 2010 (3)
- May 2010 (2)
- April 2010 (2)
- March 2010 (1)
- February 2010 (4)
- January 2010 (3)
- December 2009 (10)
- November 2009 (1)
- October 2009 (2)
- September 2009 (11)
- August 2009 (16)
- July 2009 (52)
- June 2009 (53)
- May 2009 (19)
- April 2009 (20)
- March 2009 (16)
- February 2009 (16)
- January 2009 (13)
- December 2008 (7)
- November 2008 (2)
- October 2008 (2)
- September 2008 (1)
- August 2008 (9)
- July 2008 (1)
Blogroll
Disclaimer
Blog Stats
ORA-27102: Out Of Memory And SVR4 Error: 22: Invalid argument During Startup On Solaris10 Server
Posted by Jay on March 15, 2011
I have a Solaris Sparc machine with 16 GB of physical memory and I noticed the SGA was sized to 2 GB and PGA to 1 GB for an OFSA Database. This machine has only database running and it is a partial DWH/DSS setup.
As I know this environment does a lot of trancsactions, I wanted to make use of the memory for SGA and PGA. I decided to have 6 GB for SGA and 4 GB for PGA.
SQL> alter system set sga_target = 6G scope=spfile;
SQL> alter system set pga_aggerate_target = 4G scope=spfile;
SQL> shutdown immediate;
SQL> startup;
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
I was wondering why I got the out of memory error as this server only has this database and no other apps or database is running in it. I crosschecked the memory and could see the following,
$ /usr/sbin/prtconf | grep “Memory size”
prtconf: devinfo facility not available
Memory size: 16384 Megabytes
I searched in MOS and got to know the hint for the issue from note # 779861.1. My output of /etc/system is,
$ cat /etc/system
*Oracle settings
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmni=100
Initially I thought the increase in the shmsys:shminfo_shmmax would help but it didn’t as this is replaced by ‘project.max-shm-memory’ (/etc/project). As suggested in then note, I requested my sysadmin to increase the value to 10 GB in both by the following,
set shmsys:shminfo_shmmax=10294967295
# projadd -c “Oracle” ‘user.oracle’
# projmod -s -K “project.max-shm-memory=(privileged,10.00GB,deny)” user.oracle
Once the above setting is done, the database started with the large SGA and PGA memory
Источник
Pavan DBA’s Blog
The DBA Knowledge Store
Email Subscription
Visitor Count
Categories
- 12cR2 New features (5)
- Admin (50)
- Enterprise Manager (4)
- Bkp n Recovery (15)
- cloning (4)
- Certification (3)
- Dataguard (6)
- export/import/Datapump (11)
- Freshers (1)
- General (25)
- Installation (5)
- Interview Questions (1)
- RMAN, backup n recovery (1)
- Jobs (1,701)
- Networking with Oracle (5)
- Perf Tuning (3)
- RAC (1)
- RMAN (8)
- Scripts (73)
- Administration (33)
- backup and recovery (9)
- Dataguard (2)
- Performance Tuning (28)
- RAC (1)
- Training (62)
- upgradation (10)
- User management (3)
Vote your opinion…
TechMaster Training
My Facebook Page
My Tweets
- American In JK CM’s Residence: How US Agent Stayed In Mahbuba Mufti’s Re. youtu.be/bLwyKDQPA_w via @YouTube1 month ago
- జగనన్న చేసే పనులను ఎందుకు ప్రశ్నించరు @Hindu Jana Shakti #hindujanashaktiyoutu.be/yJ4zpLgaD68 via @YouTube1 month ago
- Shraddha’s Sad End: Why Is There No Nirbhaya-like Agitation? | Raka Loka. youtu.be/ZC58TS8d2hk via @YouTube1 month ago
Follow @pavandba
My DBA links
Other DBA Blogs
how to resolve ORA-27102 error?
Posted by Pavan DBA on August 12, 2010
Good day friends…
Its been long time that i posted a technical article and reason is am busy with my new project KT.
yesterday when i am doing RMAN cloning to a different server to get a schema which is dropped, i got a peculiar error. i will post the steps to follow on how to retrieve a single table or schema using rman backup later.
when i about to start my new instance on a server (which already contains 3 databases), i got below error
SQL> startup
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
This is first time i got this error and wondered why it is…and then got a point that “may be RAM size is not sufficient to allocate memory to new instance”
i checked the cause as below
$ oerr ORA 27102
27102, 00000, “out of memory”
// *Cause: Out of memory
// *Action: Consult the trace file for details
now with this its clear that we don’t have a straight answer. then i checked alert log file and found following line
Starting ORACLE instance (normal)
Wed Aug 11 10:37:26 2010
WARNING: EINVAL creating segment of size 0x0000000080002000
fix shm parameters in /etc/system or equivalent
when i am checking at OS level, background processes are being started but OS is unable to allocate memory to SGA or PGA
After analysis, i found that either SHMMAX or SHMALL are not sufficiently mentioned at OS level kernel
In such cases, we need to do following
1. $ prtconf | grep Mem
Memory size: 8192 Megabytes
2. $ id -p
uid=500(oracle) gid=201(dba) projid=200(MCSDBT)
3. $ prctl -n project.max-shm-memory -i project 200
project: 200: MCSDBT
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 2.0GB – deny –
system 16.0EB max deny –
here you can see the value privileged is only 2 GB. so we need to increase that using the below command
4. $ prctl -n project.max-shm-memory -r -v 10G -i project 200
5. $ prctl -n project.max-shm-memory -i project 200
project: 200: MCSDBT
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 10.0GB – deny –
system 16.0EB max deny –
Now it was changed to 10G and try out, you will be able to start your instance.
Note: sometimes you may not have root privilege to execute this command, in such case you can take sys admin help.
The value which changed to 10G is temporary for that moment i.e it will be again 2 GB once you reboot server
Note : The above procedure will help in Oracle 10.2.0.4 running on Solaris 10. Commands may differ for other versions and OS flavours
Источник
Database Startup On Solaris 10 Fails With Ora-27102 Out Of Memory Error (Doc ID 399895.1)
Last updated on FEBRUARY 03, 2022
Applies to:
Oracle Database — Enterprise Edition — Version 9.2.0.8 to 12.1.0.2 [Release 9.2 to 12.1]
Solaris Operating System — Version 10 10/09 U8 to 11.3 [Release 10.0 to 11.0]
Oracle Database Cloud Schema Service — Version N/A and later
Oracle Database Exadata Express Cloud Service — Version N/A and later
Oracle Database Exadata Cloud Machine — Version N/A and later
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on x86-64 (64-bit)
Sun Solaris SPARC (64-bit)
Solaris Operating System (SPARC 64-bit)
Database startup on Solaris 10 fails with the following errors.
SQL> startup
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
And the alert log shows something similar to the following.
WARNING: EINVAL creating segment of size 0x000000002a000000
fix shm parameters in /etc/system or equivalent
Changes
Upgraded the OS to Solaris 10
Cause
To view full details, sign in with your My Oracle Support account.
Don’t have a My Oracle Support account? Click to get started!
In this Document
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.
Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us | |
|
| Legal Notices | Terms of Use
Источник
As part of a database tuning effort you increase the SGA/PGA sizes; and Oracle greets you with an ORA-27102: out of memory
error message. However the system had enough free memory to serve the needs of Oracle.
SQL> startup
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
Diagnosis
# oerr ORA 27102
27102, 00000, "out of memory"
// *Cause: Out of memory
// *Action: Consult the trace file for details
Not so helpful. If you look at the alert log for some clues.
# tail -2 alert.log
WARNING: EINVAL creating segment of size 0x000000028a006000
fix shm parameters in /etc/system or equivalent
Oracle is trying to create a 10G shared memory segment (depends on SGA/PGA sizes), but operating system (Solaris in this example) responded with an invalid argument (EINVAL) error message. There is a little hint about setting shm parameters in /etc/system
.
Prior to Solaris 10, shmsys:shminfo_shmmax
parameter has to be set in /etc/system
with maximum memory segment value that can be created. 8M is the default value on Solaris 9 and prior versions; whereas 1/4th of the physical memory is the default on Solaris 10 and later. On a Solaris 10 (or later) system, it can be verified as shown below:
# prtconf | grep Mem
Memory size: 32760 Megabytes
# id -p
uid=59008(oracle) gid=10001(dba) projid=3(default)
# prctl -n project.max-shm-memory -i project 3
project: 3: default
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 7.84GB - deny -
system 16.0EB max deny -
It is clear that the system is using the default value of 8G in this scenario, where as the application (Oracle) is trying to create a memory segment (10G) larger than 8G. Hence the failure.
The solution is to configure the system with a value large enough for the shared segment being created, so Oracle succeeds in starting up the database instance.
On Solaris 9 and prior releases, it can be done by adding the following line to /etc/system
, followed by a reboot for the system to pick up the new value.
set shminfo_shmmax = 0x000000028a006000
However shminfo_shmmax
parameter was obsoleted with the release of Solaris 10; and Sun doesn’t recommend setting this parameter in /etc/system
even though it works as expected.
On Solaris 10 and later, this value can be changed dynamically on a per projecSQL> startup ORACLE instance started. Total System Global Area 1.0905E+10 bytes Fixed Size 1316080 bytes Variable Size 4429966096 bytes Database Buffers 6442450944 bytes Redo Buffers 31457280 bytes Database mounted. Database opened.t basis with the help of resource control facilities . This is how we do it on Solaris 10 and later:
# prctl -n project.max-shm-memory -r -v 10G -i project 3
# prctl -n project.max-shm-memory -i project 3
project: 3: default
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 10.0GB - deny -
system 16.0EB max deny -
Note that changes made with the prctl
command on a running system are temporary, and will be lost when the system is rebooted. To make the changes permanent, create a project with projadd
command and associate it with the user account as shown below:
# projadd -p 3 -c 'eBS benchmark' -U oracle -G dba -K
'project.max-shm-memory=(privileged,10G,deny)' OASB
# usermod -K project=OASB oracle
Finally make sure the project is created with projects -l
or cat /etc/project
commands.
# projects -l
...
...
OASB
projid : 3
comment: "eBS benchmark"
users : oracle
groups : dba
attribs: project.max-shm-memory=(privileged,10737418240,deny)
# cat /etc/project
...
...
OASB:3:eBS benchmark:oracle:dba:project.max-shm-memory=(privileged,10737418240,deny)
With these changes, Oracle would start the database up normally.
SQL> startup
ORACLE instance started.
Total System Global Area 1.0905E+10 bytes
Fixed Size 1316080 bytes
Variable Size 4429966096 bytes
Database Buffers 6442450944 bytes
Redo Buffers 31457280 bytes
Database mounted.
Database opened.
Hi all,
I’m doing an install of a Solaris 10.2, Oracle 10.2 system. During the Create Database phase, I am getting;
ORA-27102: out of memory SVR4 Error: 22: Invalid argument
Doing some research, and reading through the details here:
Link: [http://technopark02.blogspot.com/2006/09/solaris-10oracle-fixing-ora-27102-out.html]
I think my issue is my SHM parameters, reinforced by the repeated entry in the Oracle Alert log:
+WARNING: EINVAL creating segment of size 0x0000000085000000+*
+fix shm parameters in /etc/system or equivalent+*
when the create fails.
I am not familar with Solaris’ new project mechanism, although from what I have read, it seems to be set up properly.
Here are my server details:
# prtconf | grep Mem
Memory size: 8192 Megabytes
# prctl -n project.max-shm-memory -i project 200
project: 200: QBI
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 10.0EB — deny —
system 16.0EB max deny —
And as for Oracle:
shared_pool_size = 1522029035
shared_pool_reserved_size = 152202903
pga_aggregate_target = 2705829396
sga_max_size = 3439329280
db_cache_size = 1159641169
During the course of troubleshooting, I have:
1 — Increased the amount of SHM allocated in the project. I have tried 16GB, 8 GB, 10 GB, 11GB etc, to no effect, so I reset it to 10GB (as seen above) and focused my efforts elsewhere.
2. SHARED_POOL_SIZE — I have decreased this by roughly 75% from the original value, again to no effect.
3. PGA and SGA sizes — I have increased these from the original values by an increment of 25%
Following the advice from the referenced blog (which does a good job of explaining the logic behind the actions) I have determined that the Alert log error message is telling me that it is lacking
2231369728
(Hex conversion value, which I think I need to read as 2GB, not 100% sure)
I’ve increased my project allocation, and the PGA sizes, did I just not do it enough?
Any advice?
Thanks for any input,
Troy Shane
Posted by Jay on March 15, 2011
I have a Solaris Sparc machine with 16 GB of physical memory and I noticed the SGA was sized to 2 GB and PGA to 1 GB for an OFSA Database. This machine has only database running and it is a partial DWH/DSS setup.
As I know this environment does a lot of trancsactions, I wanted to make use of the memory for SGA and PGA. I decided to have 6 GB for SGA and 4 GB for PGA.
SQL> alter system set sga_target = 6G scope=spfile;
System altered.
SQL> alter system set pga_aggerate_target = 4G scope=spfile;
System altered.
SQL> shutdown immediate;
SQL> startup;
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
I was wondering why I got the out of memory error as this server only has this database and no other apps or database is running in it. I crosschecked the memory and could see the following,
$ /usr/sbin/prtconf | grep “Memory size”
prtconf: devinfo facility not available
Memory size: 16384 Megabytes
I searched in MOS and got to know the hint for the issue from note # 779861.1. My output of /etc/system is,
$ cat /etc/system
*Oracle settings
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmni=100
Initially I thought the increase in the shmsys:shminfo_shmmax would help but it didn’t as this is replaced by ‘project.max-shm-memory’ (/etc/project). As suggested in then note, I requested my sysadmin to increase the value to 10 GB in both by the following,
set shmsys:shminfo_shmmax=10294967295
# projadd -c “Oracle” ‘user.oracle’
# projmod -s -K “project.max-shm-memory=(privileged,10.00GB,deny)” user.oracle
Once the above setting is done, the database started with the large SGA and PGA memory
This entry was posted on March 15, 2011 at 2:51 am and is filed under Database, Troubleshooting.
Tagged: ora-27102, pga_aggregate_target, project.max-shm-memory, SGA_TARGET, SVR4 Error: 22. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
I got ” ORA-27123: unable to attach to shared memory segment ” error in Oracle database.
ORA-27123: unable to attach to shared memory segment
Details of error are as follows.
ORA-27123: Unable to attach to shared memory segment Cause: shmat() call failed Action: check permissions on segment, contact Oracle support SQL> startup mount; ORA-27123: unable to attach to shared memory segment Linux-x86_64 Error: 22: Invalid argument
unable to attach to shared memory segment
This ORA-27123 error is related to the shared memory segment.
The below error is received while trying to start Database on Linux node:
SQL> startup mount; ORA-27123: unable to attach to shared memory segment Linux-x86_64 Error: 22: Invalid argument
The environment is configured similar to the below example:
SQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 6 15:38:34 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount; ORA-27123: unable to attach to shared memory segment Linux-x86_64 Error: 22: Invalid argument Physical Memory on the node is == 128GB # grep HugePsges /proc/meminfo AnonHugePages: 0 kB HugePages_Total: 5 << 5 x 1 Gb Pages HugePages_Free: 5 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 1048576 kB <<< 1Gb # grep memlock /etc/security/limits.conf * soft memlock 5242880 * hard memlock 5242880 # sysctl -a |grep shm kernel.shmmax = 68719476736 kernel.shmall = 33024983 kernel.shmmni = 4096 vm.hugetlb_shm_group = 0 # uname -a Linux server1 2.6.32-220.13.1.el6.x86_64 #1 SMP Thu Mar 29 11:46:40 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux Command line: ro root=/dev/mapper/vg_root-lv_root pci=bfsort rd_NO_LUKS rd_LVM_LV=vg_root/lv_root LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_root/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM console=ttyS0,115200 console=tty1 selinux=0 printk.time transparent_hugepage=never hugepagesz=1G default_hugepagesz=1G hugepages=15
The SGA size is 3Gb , where the HugePages reservers is 5Gb ( 5 x 1Gb) and the maximum shared memory defined is upto 68Gb (kernel.shmmax = 68719476736 )
According to UNIX: Resolving the ORA-27123 error (Doc ID 115753.1):
ORA-27123: unable to attach to shared memory segment
SVR4 Error: 22: Invalid argument
The value of the kernel parameter “shmmax” is at least 10% bigger than the estimated size of the SGA of for database. You lower the
“sgabeg” address as instructed in NOTE:1028623.6, relink Oracle and still receive the same error when you attempt to startup the database.
Set “sgabeg” to a value within the address space of your physical RAM.
Note that valid values start at 0x000000, and that the system requires 32M to boot up.
For example:
– If you have 64M of RAM, then you have a physical address space from 0x000000 to 0x4000000 (64M in hexadecimal).
– Set sgabeg address to 0x3000000 using the method shown in NOTE:1028623.6.
This will attach the SGA leaving 48M for the system.
NOTE: sgabeg = 0x10000000 for sun4c machines does not work because this is still too high of an address if machine has more than 256Mb of RAM.
The above condition will not be suitable as the SGA size is only 3Gb, and HugePages defined is 5Gb and the maximum shared memory defined is 68Gb ( shmmax )
Setting the Hugepagesize value
As per unpublished Bug 17271305, the issue is in Oracle code.
Ideally the fixed SGA would be in 2MB HugePages (it is small enough to fit into a 2MB huge page), but would require additional changes to Oracle code since the Linux shm*() interface only supports one hugepage size (whatever is set to default, either 2MB or 1GB).
Set the HugePageSize to the default value, that is 2Mb and try to restart the Database process.
# sysctl -a |grep hugepages vm.nr_hugepages = 2560 # grep HugePages /proc/meminfo AnonHugePages: 0 kB HugePages_Total: 2560 HugePages_Free: 2119 HugePages_Rsvd: 1096 HugePages_Surp: 0 Hugepagesize: 2048 kB
Error message while starting the database is
SQL> startup pfile='/<DIR>/dbs/init<SID>.ora' ORA-27123: unable to attach to shared memory segment IBM AIX RISC System/6000 Error: 13: Permission denied
The permissions in the Oracle home directory are properly set.
The Oracle executable in $ORACLE_HOME/bin permissions are already set as -rwsr-s–x
ORACLE_HOME directory has been set properly.
Another database can be brought up without any error from this same Oracle home.
Action plan provided in the below document in step C could not resolve this issue:
Note 1907569.1 – ORA-27123 While Starting the Database
Note that also shmmax should be verified to be set properly because of its relation to SGA_TARGET.
Please refer to:
Note 1527109.1 – Relationship Between SGA_TARGET and SHMMAX
In situations where shmmax was set incorrectly, the same error could be demonstrated.
In this case, none of the above pointed to the possible root cause, being a problem to attach to shared memory segments upon startup.
Rebooting the server resolved the issue as Oracle did not shutdown cleanly and could not attach to shared memory segments upon startup.
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )
1,710 views last month, 1 views today
Posted by Pavan DBA on August 12, 2010
Good day friends…
Its been long time that i posted a technical article and reason is am busy with my new project KT.
yesterday when i am doing RMAN cloning to a different server to get a schema which is dropped, i got a peculiar error. i will post the steps to follow on how to retrieve a single table or schema using rman backup later.
when i about to start my new instance on a server (which already contains 3 databases), i got below error
SQL> startup
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
This is first time i got this error and wondered why it is…and then got a point that “may be RAM size is not sufficient to allocate memory to new instance”
i checked the cause as below
$ oerr ORA 27102
27102, 00000, “out of memory”
// *Cause: Out of memory
// *Action: Consult the trace file for details
now with this its clear that we don’t have a straight answer. then i checked alert log file and found following line
Starting ORACLE instance (normal)
Wed Aug 11 10:37:26 2010
WARNING: EINVAL creating segment of size 0x0000000080002000
fix shm parameters in /etc/system or equivalent
when i am checking at OS level, background processes are being started but OS is unable to allocate memory to SGA or PGA
After analysis, i found that either SHMMAX or SHMALL are not sufficiently mentioned at OS level kernel
In such cases, we need to do following
1. $ prtconf | grep Mem
Memory size: 8192 Megabytes
2. $ id -p
uid=500(oracle) gid=201(dba) projid=200(MCSDBT)
3. $ prctl -n project.max-shm-memory -i project 200
project: 200: MCSDBT
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 2.0GB – deny –
system 16.0EB max deny –
here you can see the value privileged is only 2 GB. so we need to increase that using the below command
4. $ prctl -n project.max-shm-memory -r -v 10G -i project 200
5. $ prctl -n project.max-shm-memory -i project 200
project: 200: MCSDBT
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 10.0GB – deny –
system 16.0EB max deny –
Now it was changed to 10G and try out, you will be able to start your instance.
Note: sometimes you may not have root privilege to execute this command, in such case you can take sys admin help.
The value which changed to 10G is temporary for that moment i.e it will be again 2 GB once you reboot server
Note : The above procedure will help in Oracle 10.2.0.4 running on Solaris 10. Commands may differ for other versions and OS flavours
This entry was posted on August 12, 2010 at 12:10 PM and is filed under Admin.
Tagged: ora-27102, out of memory error, resolving ora-27102. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Operating system : Solaris Sparc 11.2
Database Version : 11.2.0.3.0
When Trying to startup the database the following error appeared :-
SQL> startup nomount ;
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
Even when trying to know which instance process do this :-
SQL> oradebug setmypid
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
SQL> oradebug ipc
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
After investigation i found the cause for this error, the solaris SHMMAX was not set correctly on OS level which mean the database was configured more than permitted memory on OS.
to solve the above error
Find which project oracle user run using the below command :-
id -p
uid=59008(oracle) gid=10001(dba) projid=3(default)
Then
prctl -n project.max-shm-memory -i project 3
project: 3: default
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 35GB – deny –
system 24EB max deny –
So i have to increase it
prctl -n project.max-shm-memory -r -v 40G -i project 3
Note the above changes will be temporary till the next restart.
Cheers
Osama
Osama considered as one of the leaders in Cloud technology, DevOps and database in the Middle-East. I have more than ten years of experience within the industry. moreover, certfied 4x AWS , 4x Azure and 6x OCI, have also obtained database certifications for multiple providers.
In addition to having experience with Oracle database and Oracle products, such as middle-ware, OID, OAM and OIM, I have gained substantial knowledge with different databases.
Currently, I am architecting and implementing Cloud and DevOps. On top of that, I’m providing solutions for companies that allow them to implement the solutions and to follow the best practices.
View all posts by Osama Mustafa
Symptom:
As part of a database tuning effort you increase the SGA/PGA sizes; and Oracle greets with an ORA-27102: out of memory
error message. The system had enough free memory to serve the needs of Oracle.
SQL> startup ORA-27102: out of memory SVR4 Error: 22: Invalid argument
Diagnosis
$ oerr ORA 27102 27102, 00000, "out of memory" // *Cause: Out of memory // *Action: Consult the trace file for details
Not so helpful. Let’s look the alert log for some clues.
% tail -2 alert.log WARNING: EINVAL creating segment of size 0x000000028a006000 fix shm parameters in /etc/system or equivalent
Oracle is trying to create a 10G shared memory segment (depends on SGA/PGA sizes), but operating system (Solaris in this example) responded with an invalid argument (EINVAL) error message. There is a little hint about setting shm parameters in /etc/system
.
Prior to Solaris 10, shmsys:shminfo_shmmax
parameter has to be set in /etc/system
with maximum memory segment value that can be created. 8M is the default value on Solaris 9 and prior versions; where as 1/4th of the physical memory is the default on Solaris 10 and later. On a Solaris 10 (or later) system, it can be verified as shown below:
% prtconf | grep Mem Memory size: 32760 Megabytes % id -p uid=59008(oracle) gid=10001(dba) projid=3(default) % prctl -n project.max-shm-memory -i project 3 project: 3: default NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT project.max-shm-memory privileged 7.84GB - deny - system 16.0EB max deny -
Now it is clear that the system is using the default value of 8G in this scenario, where as the application (Oracle) is trying to create a memory segment (10G) larger than 8G. Hence the failure.
So, the solution is to configure the system with a value large enough for the shared segment being created, so Oracle succeeds in starting up the database instance.
On Solaris 9 and prior releases, it can be done by adding the following line to /etc/system
, followed by a reboot for the system to pick up the new value.
set shminfo_shmmax = 0x000000028a006000
However shminfo_shmmax
parameter was obsoleted with the release of Solaris 10; and Sun doesn’t recommend setting this parameter in /etc/system
even though it works as expected.
On Solaris 10 and later, this value can be changed dynamically on a per project basis with the help of resource control facilities . This is how we do it on Solaris 10 and later:
% prctl -n project.max-shm-memory -r -v 10G -i project 3 % prctl -n project.max-shm-memory -i project 3 project: 3: default NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT project.max-shm-memory privileged 10.0GB - deny - system 16.0EB max deny -
Note that changes made with the prctl
command on a running system are temporary, and will be lost when the system is rebooted. To make the changes permanent, create a project with projadd
command and associate it with the user account as shown below:
% projadd -p 102 -c 'eBS benchmark' -U oracle -G dba -K 'project.max-shm-memory=(privileged,10G,deny)' OASB % usermod -K project=OASB oracle
Finally make sure the project is created with projects -l
or cat /etc/project
commands.
% projects -l ... ... OASB projid : 102 comment: "eBS benchmark" users : oracle groups : dba attribs: project.max-shm-memory=(privileged,10737418240,deny) % cat /etc/project ... ... OASB:102:eBS benchmark:oracle:dba:project.max-shm-memory=(privileged,10737418240,deny)
With these changes, Oracle would start the database up normally.
SQL> startup ORACLE instance started. Total System Global Area 1.0905E+10 bytes Fixed Size 1316080 bytes Variable Size 4429966096 bytes Database Buffers 6442450944 bytes Redo Buffers 31457280 bytes Database mounted. Database opened.
Related information:
- What’s New in Solaris System Tuning in the Solaris 10 Release?
- Resource Controls (overview)
- System Setup Recommendations for Solaris 8 and Solaris 9
- Man page of prctl(1)
- Man page of projadd
Addendum : Oracle RAC settings
Anonymous Bob suggested the following settings for Oracle RAC in the form of a comment for the benefit of others who run into similar issue(s) when running Oracle RAC. I’m pasting the comment as is (Disclaimer: I have not verified these settings):
Thanks for a great explanation, I would like to add one comment that will help those with an Oracle RAC installation. Modifying the default project covers oracle processes great and is all that is needed for a single instance DB. In RAC however, the CRS process starts the DB and it is a root owned process and root does not use the default project. To fix ORA-27102 issue for RAC I added the following lines to an init script that runs before the init.crs script fires.
# Recommended Oracle RAC system params ndd -set /dev/udp udp_xmit_hiwat 65536 ndd -set /dev/udp udp_recv_hiwat 65536 # For root processes like crsd prctl -n project.max-shm-memory -r -v 8G -i project system prctl -n project.max-shm-ids -r -v 512 -i project system # For oracle processes like sqlplus prctl -n project.max-shm-memory -r -v 8G -i project default prctl -n project.max-shm-ids -r -v 512 -i project default
So simple yet it took me a week working with Oracle and SUN to come up with that answer…Hope that helps someone out.
Bob
# posted by Blogger Bob : 6:48 AM, April 25, 2008
_____________
Technorati tags:
Solaris | Open Solaris | Oracle | troubleshooting