【ERROR】ORA-27102: out of memory 解決方法
一、問題描述
oracle資料庫在修改SGA後,啟動時報錯ORA-27102: out of memory,這很顯然表示超出了記憶體範圍,但是機器記憶體是夠的,這是why? 通過一系統search,最終發現是作業系統引數shmall設定過小影響了,shmall 引數是全部允許使用的共享記憶體大小。下面實驗一下,看看小小引數的魅力。
二、實驗
1.檢查環境
[root@sam ~]# free -m total used free shared buffers cached Mem: 1993 1590 403 0 47 752 -/+ buffers/cache: 790 1203 Swap: 4095 0 4095 [root@sam ~]# uname -a Linux sam 2.6.39-400.17.1.el6uek.x86_64 #1 SMP Fri Feb 22 18:16:18 PST 2013 x86_64 x86_64 x86_64 GNU/Linux [oracle@sam ~]$ cat /etc/sysctl.conf |grep shmall # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824 on x86_64 # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 2097152 on i386 kernel.shmall = 1073741824
2.將該值調小至107374
[root@sam ~]# sed -i 's/kernel.shmall = 1073741824/kernel.shmall = 107374/g' /etc/sysctl.conf [root@sam ~]# cat /etc/sysctl.conf |grep shmall # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824 on x86_64 # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 2097152 on i386 kernel.shmall = 107374
3.檢查SGA引數後,重新啟動資料庫
SYS@orcl >show parameter sga NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 800M sga_target big integer 0 SYS@orcl >shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
4.使修改後的引數生效
[root@sam ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 kernel.msgmnb = 65536 kernel.msgmax = 65536 fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 107374 kernel.shmmax = 2147483648 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500
5.修改SGA引數為1G後啟動資料
SYS@orcl >startup ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device Additional information: 1061158912 Additional information: 1
6.將系統引數shmall修改回源值並生效
[root@sam ~]# sed -i 's/kernel.shmall = 107374/kernel.shmall = 1073741824/g' /etc/sysctl.conf [root@sam ~]# cat /etc/sysctl.conf |grep shmall # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824 on x86_64 # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 2097152 on i386 kernel.shmall = 1073741824 [root@sam ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 kernel.msgmnb = 65536 kernel.msgmax = 65536 fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 2147483648 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500
7.啟動資料
SYS@orcl >startup ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 1010828168 bytes Database Buffers 50331648 bytes Redo Buffers 5517312 bytes Database mounted. Database opened.
8.檢查SGA引數
SYS@orcl >show parameter sga NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 1G sga_target big integer 0
三、總結
此次報錯原因主要是對作業系統引數不瞭解導致,作為一名DBA人員,時時刻刻都與操作緊密結合,有很多優化方案,最終也都與作業系統引數有關,總的來說就是未來作業系統學習也是有必要的。下面就再補充學習一下該引數。
四、補充shmmax,shmmni,shmall引數學習
shmmax 該引數定義了共享記憶體段的最大尺寸,這裡要注意的是引數值的單位是(bytes),所以需要大家算好再填寫。該引數不小於實體記憶體的一半,可能設定為記憶體的90%-100%,例如16G 記憶體,16*1024*1024*1024*90% = 15461882265,16*1024*1024*1024*100%=17179869184
shmmni 這個核心引數用於設定系統範圍內共享記憶體段的最大數量。該引數的預設值是 4096,此值也是在系統中可以啟動的Oracle例項的最大數量,通常不需要更改,因為顯然在生產環境下,一個伺服器上同時啟動的例項個數達不到這個數量。
shmall 該參數列示系統任意時刻可以分配的所有共享記憶體段的總和的最大值(以頁為單位),其值應不小於shmmax/page_size。例如上面的16G,可以為15461882265/4096 (getconf PAGESIZE可得到頁大小) = 3774873,或17179869184/4096=4194304,根據記憶體100%來推算記憶體8G為 2097152, 記憶體16G為4194304, 記憶體32G為8388608,記憶體64G為16777216。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26148431/viewspace-2670082/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 啟動Oracle報錯ORA-27102: out of memory、Linux-x86_64 Error: 28: No space leftOracleLinuxError
- Composer 記憶體不足解決方案 PHP Fatal error: Out of memory記憶體PHPError
- Win10系統玩cf出現out of memory的解決方法Win10
- OOM(Out Of Memory)OOM
- 解決yarn打包時出現“FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory”的問題YarnErrorMITAIJavaScript
- 帝國CMS更新時提示Fatal error: Allowed memory size of的解決方法Error
- 由node的批量requests引起的”heap out of memory”解決方案
- ORA-04030: out of process memory ...(initSubHeap:qk...)的錯誤解決
- JAVA IPMI Command time out 解決方法Java
- Java Out Of Memory解決之JAVA_OPTS引數說明與配置Java
- OOM(Out Of Memory)是什麼?OOM
- (轉貼)Out of Memory: Killed process
- 帝國CMSr的Fatal error:Allowed memory size of的解決辦法Error
- vi編輯器開啟大檔案報錯0602-101 Out of memory saving lines for undo的解決方法
- Javascript記憶體溢位,FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memoryJavaScript記憶體溢位ErrorASTAI
- DedeCMS Error: Tag disabled: "php" 解決方法ErrorPHP
- 帝國CMS提示parse error syntax error的解決方法Error
- 完蛋!我被 Out of Memory 包圍了!
- Nginx 報錯 504 Gateway Time-out 的解決方法NginxGateway
- java.net.SocketTimeoutException: Read timed out異常解決方法JavaException
- mac xcrun: error: active developer path 解決方法MacErrorDeveloper
- ArchLinux出現ACPI ERROR的解決方法LinuxError
- PostgreSQL DBA(95) - PG 12 Partition(out of shared memory)SQL
- composer 安裝擴充套件出現 "PHP Fatal error: Allowed memory ..."的解決辦法套件PHPError
- Dynamics CRM CRM Reporting Error: Error occurred while fetching the data extension的解決方法ErrorWhile
- git post資料過大報錯-Out of memoryGit
- iOS Out-Of-Memory 原理闡述及方案調研iOS
- mysql登入遇到ERROR 1045問題解決方法MySqlError
- 萬能方法解決——You have an error in your SQL syntaxErrorSQL
- Mac安裝Adobe軟體,提示Error解決方法MacError
- PHP Fatal error: Allowed memory size of 1610612736 bytesPHPError
- 織夢提示dedecms error warning錯誤的解決方法Error
- mysql的ERROR 1231 (42000)問題原因及解決方法MySqlError
- Error establishing a database connection 的解決方法(發現黑客入侵)ErrorDatabase黑客
- Tomcat啟動報錯:Error starting static Resources解決方法TomcatError
- Ubuntu下 fatal error: Python.h: No such file or directory 解決方法UbuntuErrorPython
- Ubuntu Cannot allocate memory 錯誤解決方案Ubuntu
- Putty或MobaXTerm無法連線VMware虛擬機器 報Network error: Connection timed out的解決方案虛擬機Error