Authentication mysql经常会突然变成Connecting

emqx最新版本, 使用docker部署, 其中使用页面上的配置连接mysq做Authentication
没有改其他配置文件

配置好mysql后. 在表中添加用户密码clientid, 配置都是正确, 也正常使用

但是后续经常出现,突然客户端连不上问题, 原因发现是 mysql的连接状态变成connecting

需要重新保存下, 恢复连接成功, 功能恢复正常

2023-01-16T06:59:31.448685+00:00 [error] clientid: xxx, line: 133, mfa: emqx_authn_mysql:authenticate/2, msg: mysql_query_failed, params: [<<“space”>>], peername: 120.36.163.44:29839, provider: emqx_authn_mysql, reason: {emqx_resource,#{msg => <<“resource not connected”>>,reason => not_connected}}, resource: <<“emqx_authn_mysql:1”>>, tag: AUTHN, timeout: 5000, tmpl_token: [{var,{var,<<“username”>>}}]

状态变成 connecting 就是连接断了正在重连。可以看下还有没有其它日志。

请问下有没有mysql重连设置的配置吗

最新看到这种日志
2023-01-16T07:05:29.396246+00:00 [warning] [PoolWorker] supervisee <0.2697.0> is force killed
2023-01-16T07:05:29.710553+00:00 [warning] [PoolWorker] supervisee <0.2597.0> is force killed
2023-01-16T07:05:29.711421+00:00 [warning] line: 421, mfa: emqx_alarm:do_actions/3, msg: alarm_is_deactivated, name: <<“emqx_authn_mysql:1”>>

方便提供一下完整日志吗?

我也发现这个问题,版本号是5.0.13

2023-03-23T08:31:46.021760+00:00 [error] id: <<“emqx_authn_mysql:2633746”>>, info: resource stopped or disabled, line: 385, mfa: emqx_resource_worker:handle_query_result/4, msg: resource_stopped
2023-03-23T08:31:46.020646+00:00 [error] id: <<“emqx_authn_mysql:2633746”>>, info: resource stopped or disabled, line: 385, mfa: emqx_resource_worker:handle_query_result/4, msg: resource_stopped
2023-03-23T08:31:45.984755+00:00 [error] clientid: a3360125-d3f9-47f8-aa41-a77544f2a9c7, line: 133, mfa: emqx_authn_mysql:authenticate/2, msg: mysql_query_failed, params: [<<“XXX”>>], peername: 10.1.2.169:50702, provider: emqx_authn_mysql, reason: {resource_error,#{msg => “resource stopped or disabled”,reason => stopped}}, resource: <<“emqx_authn_mysql:2633746”>>, tag: AUTHN, timeout: 5000, tmpl_token: [{var,{var,<<“username”>>}}]
2023-03-23T08:31:45.984653+00:00 [error] id: <<“emqx_authn_mysql:2633746”>>, info: resource stopped or disabled, line: 385, mfa: emqx_resource_worker:handle_query_result/4, msg: resource_stopped
2023-03-23T08:31:45.982034+00:00 [error] clientid: d84e9627-0ec8-4218-8e5c-6c9179df0ec6, line: 133, mfa: emqx_authn_mysql:authenticate/2, msg: mysql_query_failed, params: [<<“XXX”>>], peername: 10.1.2.169:50692, provider: emqx_authn_mysql, reason: {resource_error,#{msg => “resource stopped or disabled”,reason => stopped}}, resource: <<“emqx_authn_mysql:2633746”>>, tag: AUTHN, timeout: 5000, tmpl_token: [{var,{var,<<“username”>>}}]
2023-03-23T08:31:45.981925+00:00 [error] id: <<“emqx_authn_mysql:2633746”>>, info: resource stopped or disabled, line: 385, mfa: emqx_resource_worker:handle_query_result/4, msg: resource_stopped
2023-03-23T08:31:42.205970+00:00 [error] clientid: 2457dd87-fab9-4d7e-af15-dff0622f66b7, line: 133, mfa: emqx_authn_mysql:authenticate/2, msg: mysql_query_failed, params: [<<“XXX”>>], peername: 10.1.3.236:34072, provider: emqx_authn_mysql, reason: {resource_error,#{msg => “resource stopped or disabled”,reason => stopped}}, resource: <<“emqx_authn_mysql:2633746”>>, tag: AUTHN, timeout: 5000, tmpl_token: [{var,{var,<<“username”>>}}]
2023-03-23T08:31:42.205855+00:00 [error] id: <<“emqx_authn_mysql:2633746”>>, info: resource stopped or disabled, line: 385, mfa: emqx_resource_worker:handle_query_result/4, msg: resource_stopped
2023-03-23T08:31:42.168844+00:00 [error] clientid: 91b0bdad-aaa0-4823-9d5f-17b50b7a01c1, line: 133, mfa: emqx_authn_mysql:authenticate/2, msg: mysql_query_failed, params: [<<“XXX”>>], peername: 10.1.3.236:34068, provider: emqx_authn_mysql, reason: {resource_error,#{msg => “resource stopped or disabled”,reason => stopped}}, resource: <<“emqx_authn_mysql:2633746”>>, tag: AUTHN, timeout: 5000, tmpl_token: [{var,{var,<<“username”>>}}]
2023-03-23T08:31:42.168712+00:00 [error] id: <<“emqx_authn_mysql:2633746”>>, info: resource stopped or disabled, line: 385, mfa: emqx_resource_worker:handle_query_result/4, msg: resource_stopped
@t1ger