【 使用环境 】 测试环境
【 OB 】
【 使用版本 】3.2.4
【问题描述】无缘无故报错
ERROR 4013 (HY001): No memory or reach tenant memory limit
【复现路径】问题出现前后相关操作
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
单机安装oceanbase的3.2.4版本,
启动运行没多久后(并未手动做任何数据库操作),报错如下:
开始都正常的,不清楚是什么逐渐占用了数据库内存?
[admin@lnpg log]$ obclient -h192.168.207.143 -P2881 -uadmin@t_lndb -padmin -A
ERROR 4013 (HY001): No memory or reach tenant memory limit
[admin@lnpg log]$ free -g
total used free shared buff/cache available
Mem: 31 26 0 0 4 4
Swap: 7 7 0
[admin@lnpg log]$
[admin@lnpg log]$ ls -lt|head
总用量 63022936
-rw-r--r-- 1 admin admin 7685552 6月 27 14:36 observer.log
-rw-r--r-- 1 admin admin 569383 6月 27 14:36 observer.log.wf
-rw-r--r-- 1 admin admin 199791545 6月 27 14:36 rootservice.log
-rw-r--r-- 1 admin admin 11797566 6月 27 14:36 rootservice.log.wf
-rw-r--r-- 1 admin admin 268435825 6月 27 14:36 observer.log.20240627143616297
-rw-r--r-- 1 admin admin 19512919 6月 27 14:36 observer.log.wf.20240627143616297
-rw-r--r-- 1 admin admin 3138577 6月 27 14:35 election.log
-rw-r--r-- 1 admin admin 268435482 6月 27 14:32 observer.log.20240627143221340
-rw-r--r-- 1 admin admin 19420650 6月 27 14:32 observer.log.wf.20240627143221340
[admin@lnpg log]$ tail -10 observer.log
[2024-06-27 14:36:28.139234] WDIAG [SERVER] ob_inner_sql_connection.cpp:906 [14578][0][YB42C0A8CF8F-00061BC6C737FE67-0-0] [lt=6] [dc=0][errcode=-4013] failed to close result(close_ret=-4006, ret=-4013)
[2024-06-27 14:36:28.139245] ERROR issue_dba_error (ob_log.cpp:2322) [14578][0][YB42C0A8CF8F-00061BC6C737FE67-0-0] [lt=2] [dc=0][errcode=-4388] Unexpected internal error happen, please checkout the internal errcode(errcode=-4013, file="ob_malloc.h", line_no=54, info="allocate memory fail")
[2024-06-27 14:36:28.139252] EDIAG [LIB] ob_malloc.h:54 [14578][0][YB42C0A8CF8F-00061BC6C737FE67-0-0] [lt=6] [dc=0][errcode=-4013] allocate memory fail(attr=tenant_id=1, label=MysqlRequesReco, ctx_id=0, prio=0, nbyte=2088960) BACKTRACE:0x1142dc68 0x1141f093 0x6244a74 0x624458f 0x6244307 0x627dadf 0x627d86f 0x627a53e 0x603b743 0xcc25235 0xfbc2770 0xcffebbb 0xd001173 0xd008c31 0xd009578 0x10d6a4ac 0xc4780db 0xc47ab84 0xc486447 0x620e02d 0x620dab2 0x6376bee 0x10daac5f 0x10daaa9a 0x11d4aa6f
[2024-06-27 14:36:28.139261] WDIAG [SERVER] ob_inner_sql_connection.cpp:931 [14578][0][YB42C0A8CF8F-00061BC6C737FE67-0-0] [lt=8] [dc=0][errcode=-4013] failed to process record(executor={ObIExecutor:, sql:" update __all_weak_read_service set min_version=1719470188073115, max_version=1719470188073115 where level_id = 0 and level_value = '' and min_version = 1719447944749745 and max_version = 1719447944749745 "}, record_ret=-4013, ret=-4013)
[2024-06-27 14:36:28.139270] WDIAG [SERVER] ob_inner_sql_connection.cpp:953 [14578][0][YB42C0A8CF8F-00061BC6C737FE67-0-0] [lt=6] [dc=0][errcode=-4013] failed to process final(executor={ObIExecutor:, sql:" update __all_weak_read_service set min_version=1719470188073115, max_version=1719470188073115 where level_id = 0 and level_value = '' and min_version = 1719447944749745 and max_version = 1719447944749745 "}, aret=-4013, ret=-4013)
[2024-06-27 14:36:28.139276] WDIAG [SERVER] ob_inner_sql_connection.cpp:1386 [14578][0][Y0-0000000000000000-0-0] [lt=4] [dc=0][errcode=-4013] execute sql failed(ret=-4013, tenant_id=1005, sql= update __all_weak_read_service set min_version=1719470188073115, max_version=1719470188073115 where level_id = 0 and level_value = '' and min_version = 1719447944749745 and max_version = 1719447944749745 )
[2024-06-27 14:36:28.139284] WDIAG [SERVER] ob_inner_sql_connection.cpp:1404 [14578][0][Y0-0000000000000000-0-0] [lt=3] [dc=0][errcode=-4013] execute_write failed(ret=-4013, tenant_id=1005, sql=" update __all_weak_read_service set min_version=1719470188073115, max_version=1719470188073115 where level_id = 0 and level_value = '' and min_version = 1719447944749745 and max_version = 1719447944749745 ")
[2024-06-27 14:36:28.139291] WDIAG [COMMON.MYSQLP] ob_mysql_proxy.cpp:117 [14578][0][Y0-0000000000000000-0-0] [lt=5] [dc=0][errcode=-4013] execute sql failed(ret=-4013, conn=0x7f6677b6cbd0, start=1719470188138927, sql=" update __all_weak_read_service set min_version=1719470188073115, max_version=1719470188073115 where level_id = 0 and level_value = '' and min_version = 1719447944749745 and max_version = 1719447944749745 ")
[2024-06-27 14:36:28.139309] WDIAG [STORAGE.TRANS] ob_tenant_weak_read_cluster_service.cpp:298 [14578][0][Y0-0000000000000000-0-0] [lt=3] [dc=0][errcode=-4013] execute update cluster weak read version sql fail(ret=-4013, ret="OB_ALLOCATE_MEMORY_FAILED", tenant_id=1005, sql= update __all_weak_read_service set min_version=1719470188073115, max_version=1719470188073115 where level_id = 0 and level_value = '' and min_version = 1719447944749745 and max_version = 1719447944749745 , affected_rows=0)
[2024-06-27 14:36:28.139321] WDIAG [STORAGE.TRANS] ob_tenant_weak_read_cluster_service.cpp:640 [14578][0][Y0-0000000000000000-0-0] [lt=7] [dc=0][errcode=-4013] persist CLUSTER weak read version if need fail(ret=-4013, ret="OB_ALLOCATE_MEMORY_FAILED", wrs_pkey_={tid:1105009185915106, partition_id:0, part_cnt:0}, min_version_=1719447944749745, max_version_=1719447944749745, new_min_version=1719470188073115, new_max_version=1719470188073115, record_exist=true, affected_rows=0, error_count_for_change_leader_=517, last_error_tstamp_for_change_leader_=1719470188139316)
[admin@lnpg log]$
[admin@lnpg log]$ tail -10 rootservice.log
[2024-06-27 14:36:37.911036] WDIAG [RS] ob_freeze_info_manager.cpp:684 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=4] [dc=0][errcode=-4014] fail to get freeze info(ret=-4014)
[2024-06-27 14:36:37.911038] WDIAG [RS] ob_freeze_info_updater.cpp:134 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=2] [dc=0][errcode=-4014] fail to broadcase freeze info(ret=-4014)
[2024-06-27 14:36:37.911041] WDIAG [RS] ob_freeze_info_updater.cpp:101 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=3] [dc=0][errcode=-4014] fail to broadcase freeze info(ret=-4014)
[2024-06-27 14:36:37.911045] INFO [RS] ob_freeze_info_manager.cpp:278 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=3] [dc=0] invalid freeze info in memory, need reload
[2024-06-27 14:36:37.911466] ERROR issue_dba_error (ob_log.cpp:2322) [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=2] [dc=0][errcode=-4388] Unexpected internal error happen, please checkout the internal errcode(errcode=-4013, file="ob_malloc.h", line_no=54, info="allocate memory fail")
[2024-06-27 14:36:37.911476] EDIAG [LIB] ob_malloc.h:54 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=9] [dc=0][errcode=-4013] allocate memory fail(attr=tenant_id=1, label=MysqlRequesReco, ctx_id=0, prio=0, nbyte=2088960) BACKTRACE:0x1142dc68 0x1141f093 0x6244a74 0x624458f 0x6244307 0x627dadf 0x627d86f 0x627a53e 0x603b743 0xcc25235 0xfbc2770 0xcffebbb 0xd001173 0xd0097f1 0xd009e1c 0x10d69d2c 0x10d699e4 0x62c77ad 0x63461b6 0x96860c0 0x9685aca 0x969de92 0x8e63de0 0x1156261d 0x11561f56 0x77ad8c7 0x10daac5f 0x10daaa9a 0x11d4aa6f
[2024-06-27 14:36:37.911519] WDIAG [RS] ob_freeze_info_manager.cpp:1090 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=13] [dc=0][errcode=-4014] freeze info is unvalid(ret=-4014, ret="OB_INNER_STAT_ERROR")
[2024-06-27 14:36:37.911526] WDIAG [RS] ob_freeze_info_updater.cpp:109 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=7] [dc=0][errcode=-4014] fail to check_snapshot_gc_ts(ret=-4014, ret="OB_INNER_STAT_ERROR")
[2024-06-27 14:36:37.912006] ERROR issue_dba_error (ob_log.cpp:2322) [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=3] [dc=0][errcode=-4388] Unexpected internal error happen, please checkout the internal errcode(errcode=-4013, file="ob_malloc.h", line_no=54, info="allocate memory fail")
[2024-06-27 14:36:37.912012] EDIAG [LIB] ob_malloc.h:54 [13770][0][YB42C0A8CF8F-00061BC6C0D8CFBD-0-0] [lt=5] [dc=0][errcode=-4013] allocate memory fail(attr=tenant_id=1, label=MysqlRequesReco, ctx_id=0, prio=0, nbyte=2088960) BACKTRACE:0x1142dc68 0x1141f093 0x6244a74 0x624458f 0x6244307 0x627dadf 0x627d86f 0x627a53e 0x603b743 0xcc25235 0xfbc2770 0xcffebbb 0xd001173 0xd0097f1 0xd009e1c 0x10d69d2c 0x10d699e4 0x7707987 0x969b9cf 0x969df23 0x8e63de0 0x1156261d 0x11561f56 0x77ad8c7 0x10daac5f 0x10daaa9a 0x11d4aa6f
安装参考的文档如下:
裸机部署单副本 oceanbase-3.2.4.1 企业版(for ORACLE)集群
https://www.modb.pro/db/1803064752108298240