ITPub博客

首页 > 数据库 > Oracle > ogg破案之内存设置使replicat进程abended

ogg破案之内存设置使replicat进程abended

原创 Oracle 作者:水逸冰 时间:2018-11-27 16:09:44 0 删除 编辑

新装好的Oracle 12.2数据库在启动replicat进程的时候abended。
ogg日志报错:
/ERROR
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
                          : [  : [/opt/app/oracle/products/ogts/oglicat(ggs::gglib::MultiThreiThre::MainThread::Run(int, char char ]
                          : [/opt/app/oracle/products/ogg/replicat()]
                          : [/opt/app/oracle/products/ogg/replicat()]
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, c`^A]
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, c`^A]
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, c`^A]
                          : [_ZN3ggs5gglib14MultiThreading6Thread9RunThreadEPNS2_10ThreadArgsE]
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, c`^A]
                          : [_ZN3ggs5gglib14MultiThreading6Thread9RunThreadEPNS2_10ThreadArgsE]
                          : [/opt/app/oracle/products/ogg/replicat()]
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, c`^A]
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
                          : [/opt/app/oracle/products/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
                          : [/opt/app/oracle/products/ogg/replicat()]
                          : [/opt/app/oracle/products/ogg/replicat()]
                          : [/opt/app/oracle/products/ogg/replicat()]

2018-11-27 14:32:06  ERROR   OGG-00664  OCI Error Flushing database inbound server, 'OGG$MI_RE01' (status = 26815-ORA-26815: ^Z^Z^Z^Z^Z^Z^Z^Z "OGG$MI_RE01" ^Z^Z^Z^Z^Z^Z "replicat" ^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z
ORA-04031: ^Z^Z^Z^Z^Z^Z^Z^Z 120 ^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z ("streams pool","unknown object",).


数据库alert日志报错
2018-11-27T14:32:14.275308+08:00
GoldenGate APPLY AP01 for OGG$MI_RE01 with pid=208, OS id=99648 stopped
2018-11-27T14:32:16.054518+08:00
Errors in file /opt/app/oracle/diag/rdbms/baseblog/BASEBLOG/trace/BASEBLOG_q002_99687.trc  (incident=11002):
ORA-04031: unable to allocate 3280 bytes of shared memory ("streams pool","unknown object","streams pool","sob_kgqmrec")
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.


trace文件
DDE: Problem Key 'ORA 4031' was flood controlled (0x2) (incident: 11002)
ORA-04031: unable to allocate 3280 bytes of shared memory ("streams pool","unknown object","streams pool","sob_kgqmrec")
KSV 4031 error in slave process

*** 2018-11-27T14:32:16.073462+08:00
ORA-04031: unable to allocate 3280 bytes of shared memory ("streams pool","unknown object","streams pool","sob_kgqmrec")
OPIRIP: Uncaught error 447. Error stack:
ORA-00447: fatal error in background process
ORA-04031: unable to allocate 3280 bytes of shared memory ("streams pool","unknown object","streams pool","sob_kgqmrec")

造成replicat进程abended的原因是无法分配流池内存。Oracle建议一根replicat进程要至少1.25G内存,ogg的内存是占用SGA的流池的,这里我是静默安装,内存参数还没有调整,sga内存太小,无法分配足够内存给流池,造成上述报错。


调整内存
vm.nr_hugepages=30721
sysctl -p

alter system set sga_max_size=63G scope=spfile;
alter system set sga_target=50G scope=spfile;
alter system set pga_aggregate_target=15G scope=both;
alter system set pga_aggregate_limit=30G scope=spfile;
alter system set streams_pool_size=3G scope=spfile;

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup

注意:
12c中是用pga_aggregate_limit控制pga内存最大使用(hard limit)。
pga_aggregate_limit=max(2*pga_aggregate_target,3*PROCESSES)


启动复制进程
start mi_re01

启动后alert日志中:
2018-11-27T15:33:39.540140+08:00
APPLY OGG$MI_RE01: Source Database: NULL
APPLY OGG$MI_RE01: Source Root Name: NULL
APPLY OGG$MI_RE01: Applied Message Number: 180483887
APPLY OGG$MI_RE01: Message Create Time: 00:01, 2018/11/27
2018-11-27T15:33:40.368336+08:00
Propagation Receiver (CCA) for GoldenGate replicat and Apply OGG$MI_RE01 with pid=44, OS id=105183, objnum=0 , LCRID ver=2 started.




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31480688/viewspace-2221818/,如需转载,请注明出处,否则将追究法律责任。

下一篇: sql monitor简介
请登录后发表评论 登录
全部评论
精通oracle,mysql和linux,热衷于研究数据库,擅长shell和Python自动化运维。VX:18302174682

注册时间:2017-08-05

  • 博文量
    104
  • 访问量
    119345