【 使用环境 】 测试环境
【 OB or 其他组件 】
【 使用版本 】社区版4.1 我这边部署了3台数据库 一台ocp express 然后在ocp上部署了一台 obp
【问题描述】我这边有五个容器springboot的应用 通过连接池方式去链接 有几个容器出现连接错误截图如下
【复现路径】问题出现前后相关操作
【问题现象及影响】
【附件】
【 使用环境 】 测试环境
【 OB or 其他组件 】
【 使用版本 】社区版4.1 我这边部署了3台数据库 一台ocp express 然后在ocp上部署了一台 obp
【问题描述】我这边有五个容器springboot的应用 通过连接池方式去链接 有几个容器出现连接错误截图如下
【复现路径】问题出现前后相关操作
【问题现象及影响】
【附件】
hikari 的版本是多少?5.x 版本目前还没适配。另外,需要留意下是不是开了 ssl
看报错的驱动类名,应该是使用了mysql 8的驱动。
目前的oceanbase版本不支持mysql8驱动,可以切换到5.1.47版本驱动测试使用。
要么使用oceanbase官方提供的驱动版本。
mysql 8和5都试了 我这边的情况是能连接上也能正常跑 这边一共4个docker的Springboot的容器 每个连接池都是最大连接数设置的100 启动了3个springboot的项目后第四个就报错 不知道是不是 客户端连接数的问题 不知道从哪里改
我们使用过程,obproxy应该是有最大连接数参数,默认8192个,应该是可以满足你这个配置的。
看看有没有其他更完整异常日志,然后再obproxy里也看看异常有没有。
这是obproxy的error日志2000行
2023-07-11 14:00:35.042484,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,754us,0us,0us,0us,Y0-00007F7DEF4E3D60,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:00:35.044289,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,670us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:00:35.045910,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,794us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:00:36.256242,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,766us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:00:39.312846,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,890us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:00:39.315276,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,902us,0us,0us,0us,Y0-00007F7DEF4E3D60,0,192.168.1.22:2881,Unknown Error,
2023-07-11 14:00:39.317379,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,1092us,0us,0us,0us,Y0-00007F7DE3BB7D80,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:00:40.527691,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,949us,0us,0us,0us,Y0-00007F7DE3BB7D80,0,192.168.1.22:2881,Unknown Error,
2023-07-11 14:00:45.716786,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,848us,0us,0us,0us,Y0-00007F7DE3BB7D80,0,192.168.1.22:2881,Unknown Error,
2023-07-11 14:00:45.718280,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,764us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:00:45.720337,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,523us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:00:46.931357,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,821us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:00:55.320299,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,814us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:00:55.321924,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,845us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.22:2881,Unknown Error,
2023-07-11 14:00:55.323700,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,931us,0us,0us,0us,Y0-00007F7DE3BB7D80,0,192.168.1.22:2881,Unknown Error,
2023-07-11 14:00:56.534226,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,1042us,0us,0us,0us,Y0-00007F7DE3BB7D80,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:01:05.324411,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,814us,0us,0us,0us,Y0-00007F7DE3BB7D80,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:01:05.327142,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,750us,0us,0us,0us,Y0-00007F7DEEE2E960,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:01:05.329576,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,884us,0us,0us,0us,Y0-00007F7DE57CD3F0,0,192.168.1.22:2881,Unknown Error,
2023-07-11 14:01:06.538045,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,887us,0us,0us,0us,Y0-00007F7DE57CD3F0,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:01:15.328899,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,1138us,0us,0us,0us,Y0-00007F7DE57CD3F0,0,192.168.1.21:2881,Unknown Error,
2023-07-11 14:01:15.330910,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,734us,0us,0us,0us,Y0-00007F7DE3BB7D80,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:01:15.333204,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,804us,0us,0us,0us,Y0-00007F7DE57CD3F0,0,192.168.1.20:2881,Unknown Error,
2023-07-11 14:01:16.542020,undefined,obs:sys:,OB_MYSQL,OB_MYSQL_COM_LOGIN,failed,-4124,909us,0us,0us,0us,Y0-00007F7DE57CD3F0,0,192.168.1.22:2881,Unknown Error,
这个下面是正常的obp。log日志我做了个grep error的筛选
[2023-07-11 14:23:55.799712] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=35] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134790)
[2023-07-11 14:24:00.267724] INFO [PROXY.TXN] ob_mysql_transact.cpp:5220 [3176][Y0-00007F7DEEE2FCE0] [lt=4] [dc=0] [ObMysqlTransact::handle_server_connection_break](client_ip={192.168.1.23:16458}, server_ip={192.168.1.21:2881}, cs_id=198502, proxy_sessid=13882347049854434332, ss_id=0, server_sessid=0, sm_id=134791, proxy_user_name=meta@ocp#obs, database_name=ocp_express, server_state=“INTERNAL_ERROR”, request_cmd=“Quit”, sql_cmd=“Quit”, sql=)
[2023-07-11 14:24:00.278032] INFO [PROXY.TXN] ob_mysql_transact.cpp:5220 [3176][Y0-00007F7DE3BB7880] [lt=4] [dc=0] [ObMysqlTransact::handle_server_connection_break](client_ip={192.168.1.23:16464}, server_ip={192.168.1.21:2881}, cs_id=198503, proxy_sessid=13882347049854434333, ss_id=0, server_sessid=0, sm_id=134792, proxy_user_name=meta@ocp#obs, database_name=ocp_express, server_state=“INTERNAL_ERROR”, request_cmd=“Quit”, sql_cmd=“Quit”, sql=)
[2023-07-11 14:24:00.285741] INFO [PROXY.TXN] ob_mysql_transact.cpp:5220 [3176][Y0-00007F7DEEE2FCE0] [lt=4] [dc=0] [ObMysqlTransact::handle_server_connection_break](client_ip={192.168.1.23:16470}, server_ip={192.168.1.21:2881}, cs_id=198504, proxy_sessid=13882347049854434334, ss_id=0, server_sessid=0, sm_id=134793, proxy_user_name=meta@ocp#obs, database_name=ocp_express, server_state=“INTERNAL_ERROR”, request_cmd=“Quit”, sql_cmd=“Quit”, sql=)
[2023-07-11 14:24:00.292420] INFO [PROXY.TXN] ob_mysql_transact.cpp:5220 [3176][Y0-00007F7DE3BB7880] [lt=4] [dc=0] [ObMysqlTransact::handle_server_connection_break](client_ip={192.168.1.23:16476}, server_ip={192.168.1.21:2881}, cs_id=198505, proxy_sessid=13882347049854434335, ss_id=0, server_sessid=0, sm_id=134794, proxy_user_name=meta@ocp#obs, database_name=ocp_express, server_state=“INTERNAL_ERROR”, request_cmd=“Quit”, sql_cmd=“Quit”, sql=)
[2023-07-11 14:24:12.842307] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=164] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134795)
[2023-07-11 14:24:13.841599] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=37] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134796)
[2023-07-11 14:24:14.841044] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=34] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134797)
[2023-07-11 14:24:15.841090] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=34] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134798)
[2023-07-11 14:24:38.934809] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=25] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134799)
[2023-07-11 14:25:08.195676] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=31] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134800)
[2023-07-11 14:25:11.194219] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=41] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134801)
[2023-07-11 14:25:12.219828] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=33] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134802)
[2023-07-11 14:25:13.219903] INFO [PROXY.SM] ob_mysql_sm.cpp:8651 [3174][Y0-00007F7E0303F9C0] [lt=37] [dc=0] INTERNAL_ERROR, will disconnect(sm_id=134803)
设置客户端连接数了吗?参考这篇文档,参数是 client_max_connections
: https://www.oceanbase.com/docs/community-odp-cn-10000000001717352
ALTER proxyconfig SET client_max_connections = 16384;
客户端连接数满了,应该报错too many connections。
目前好像没有看到这个异常