总是重新连接,麻烦看看我给的日志

环境

  • EMQX 版本:5.0.1
  • 操作系统版本:Ubuntu 18.04.6 LTS

大概有60个设备发送消息,系统消费这些消息,总是出现断线,日志出现下面的

2024-05-05T11:24:16.819803+08:00 [debug] clientid: emqx_my1714877449182dev, line: 1027, mfa: emqx_connection:check_oom/1, msg: check_oom, peername: 122.112.238.240:54450, policy: #{enable => true,max_heap_size => 4194304,max_message_queue_len => 1000}

我想问下,是消费消息能力不够还是, mqtt boker性能不足

2024-05-05T11:24:55+08:00 [SOCKET] emqx_my1714877449182dev@122.112.238.240:54450 msg: emqx_connection_terminated, reason: {shutdown,tcp_closed}
2024-05-05T11:24:55.216655+08:00 [info] clientid: emqx_my1714877449182dev, line: 636, mfa: emqx_connection:terminate/2, msg: terminate, peername: 122.112.238.240:54450, reason: {shutdown,tcp_closed}
2024-05-05T11:24:55+08:00 [MQTT] emqx_my1714877449182dev@122.112.238.240:54812 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0),ClientId=emqx_my1714877449182dev, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=90, Username=vzenith, Password=******
2024-05-05T11:24:55+08:00 [AUTHN] emqx_my1714877449182dev@122.112.238.240:54812 msg: authenticator_result, authenticator: password_based:built_in_database, result: {ok,#{is_superuser => false}}
2024-05-05T11:24:55+08:00 [AUTHN] emqx_my1714877449182dev@122.112.238.240:54812 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false}}}
2024-05-05T11:24:55.546355+08:00 [debug] client_id: <<“emqx_my1714877449182dev”>>, clientid: emqx_my1714877449182dev, line: 155, mfa: emqx_cm:insert_channel_info/3, msg: insert_channel_info, peername: 122.112.238.240:54812
2024-05-05T11:24:55+08:00 [MQTT] emqx_my1714877449182dev@122.112.238.240:54812 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0),AckFlags=0, ReasonCode=0
2024-05-05T11:24:55+08:00 [MQTT] emqx_my1714877449182dev@122.112.238.240:54812 msg: mqtt_packet_received, packet: SUBSCRIBE(Q1, R0, D0),PacketId=110 TopicFilters=[$share/g1/+/device/message/up/ivs_result(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/up/snapshot(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/down/ivs_trigger/reply(#{nl => 0,qos => 0,rap => 0,
rh => 0}),$share/g1/+/device/message/up/keep_alive(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/down/gpio_out/reply(#{nl => 0,qos => 0,rap => 0,
rh => 0}),$share/g1/+/device/message/down/serial_data/reply(#{nl => 0,qos => 0,rap => 0,
rh => 0}),$share/g1/+/device/message/down/set_time/reply(#{nl => 0,qos => 0,rap => 0,
rh => 0}),$share/g1/+/device/message/down/snapshot/reply(#{nl => 0,qos => 0,rap => 0,
rh => 0}),$share/g1/+/device/message/down/white_list_operator/reply(#{nl => 0,qos => 0,
rap => 0,rh => 0}),$share/g1/+/device/message/up/gpio_in(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/up/serial_data(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/down/get_device_timestamp/reply(#{nl => 0,qos => 0,
rap => 0,rh => 0}),$share/g1/+/device/message/down/reboot_dev/reply(#{nl => 0,qos => 0,rap => 0,
rh => 0}),$share/g1/+/device/message/down/set_cloud_ctrl/reply(#{nl => 0,qos => 0,
rap => 0,rh => 0}),$share/g1/+/device/message/down/set_io_lock_status/reply(#{nl => 0,qos => 0,
rap => 0,rh => 0}),$share/g1/+/device/message/down/get_io_lock_status/reply(#{nl => 0,qos => 0,
rap => 0,rh => 0}),$share/g1/+/device/message/down/get_io_status/reply(#{nl => 0,qos => 0,
rap => 0,rh => 0})]

并没看到断线的错误日志,唯一相关的是:

2024-05-05T11:24:55+08:00 [SOCKET] emqx_my1714877449182dev@122.112.238.240:54450 msg: emqx_connection_terminated, reason: {shutdown,tcp_closed}

这表示 Socket 被断开了;如果 EMQX 前面有 LB 检查下保活时间配置的是多少要大于你MQTT设备的使用的心跳间隔(这里你用的是 90s)

设备心跳是30秒,
我看到这个日志
2024-05-07T16:28:18.926219+08:00 [warning] line: 417, mfa: emqx_alarm:do_actions/3, msg: alarm_is_deactivated, name: <<“conn_congestion/emqx_my1715066257440dev/vzenith”>>
为什么设备连多了,消费的client 就容易断

2024-05-07T16:28:18.503393+08:00 [debug] clientid: emqx_my1715066257440dev, line: 827, mfa: emqx_connection:serialize_and_inc_stats_fun/1, msg: mqtt_packet_sent, packet: PUBLISH(Q0, R0, D0),Topic=ee790e92-7a9360f0/device/message/up/keep_alive, PacketId=undefinedPayload={“bv”:12378,“id”:“EiOlbBmvDlToxhVC”,“name”:“keep_alive”,“payload”:{“body”:{“timestamp”:1715070498}},“sn”:“ee790e92-7a9360f0”,“timestamp”:1715070498,“version”:“1.0”}, , peername: 122.112.238.240:54296, tag: MQTT
2024-05-07T16:28:18.813231+08:00 [debug] clientid: 2e5b7fd4-9ee6a568, line: 781, mfa: emqx_connection:handle_incoming/2, msg: mqtt_packet_received, packet: PINGREQ(Q0, R0, D0), peername: 221.226.211.69:55296, tag: MQTT
2024-05-07T16:28:18.813409+08:00 [debug] clientid: 2e5b7fd4-9ee6a568, line: 827, mfa: emqx_connection:serialize_and_inc_stats_fun/1, msg: mqtt_packet_sent, packet: PINGRESP(Q0, R0, D0), peername: 221.226.211.69:55296, tag: MQTT
2024-05-07T16:28:18.926219+08:00 [warning] line: 417, mfa: emqx_alarm:do_actions/3, msg: alarm_is_deactivated, name: <<“conn_congestion/emqx_my1715066257440dev/vzenith”>>
2024-05-07T16:28:18.926565+08:00 [debug] clientid: emqx_my1715066257440dev, line: 631, mfa: emqx_connection:terminate/2, msg: emqx_connection_terminated, peername: 122.112.238.240:54296, reason: {shutdown,tcp_closed}, tag: SOCKET
2024-05-07T16:28:18.926694+08:00 [info] clientid: emqx_my1715066257440dev, line: 636, mfa: emqx_connection:terminate/2, msg: terminate, peername: 122.112.238.240:54296, reason: {shutdown,tcp_closed}
2024-05-07T16:28:18.926927+08:00 [info] line: 442, mfa: emqx_shared_sub:handle_info/2, msg: shared_subscriber_down, reason: {shutdown,tcp_closed}, sub_pid: <0.25657.25>
2024-05-07T16:28:19.107100+08:00 [debug] line: 781, mfa: emqx_connection:handle_incoming/2, msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0),ClientId=48649ddb-48dca283, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=30, Username=vzenith, Password=, peername: 114.221.58.83:35197, tag: MQTT
2024-05-07T16:28:19.107320+08:00 [debug] clientid: 48649ddb-48dca283, line: 356, mfa: emqx_channel:handle_in/2, msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0),ClientId=48649ddb-48dca283, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=30, Username=vzenith, Password=
, peername: 114.221.58.83:35197, tag: MQTT
2024-05-07T16:28:19.107474+08:00 [debug] authenticator: <<“password_based:built_in_database”>>, clientid: 48649ddb-48dca283, line: 674, mfa: emqx_authentication:authenticate_with_provider/2, msg: authenticator_result, peername: 114.221.58.83:35197, result: {error,bad_username_or_password}, tag: AUTHN
2024-05-07T16:28:19.107581+08:00 [debug] clientid: 48649ddb-48dca283, line: 246, mfa: emqx_authentication:authenticate/2, msg: authentication_result, peername: 114.221.58.83:35197, reason: chain_result, result: {stop,{error,bad_username_or_password}}, tag: AUTHN
2024-05-07T16:28:19.107734+08:00 [debug] clientid: 48649ddb-48dca283, line: 827, mfa: emqx_connection:serialize_and_inc_stats_fun/1, msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0),AckFlags=0, ReasonCode=4, peername: 114.221.58.83:35197, tag: MQTT
2024-05-07T16:28:19.107900+08:00 [debug] clientid: 48649ddb-48dca283, line: 631, mfa: emqx_connection:terminate/2, msg: emqx_connection_terminated, peername: 114.221.58.83:35197, reason: {shutdown,bad_username_or_password}, tag: SOCKET
2024-05-07T16:28:19.108002+08:00 [info] clientid: 48649ddb-48dca283, line: 636, mfa: emqx_connection:terminate/2, msg: terminate, peername: 114.221.58.83:35197, reason: {shutdown,bad_username_or_password}
2024-05-07T16:28:19.152880+08:00 [debug] clientid: 2da1c4a7-83c3ee2d, line: 781, mfa: emqx_connection:handle_incoming/2, msg: mqtt_packet_received, packet: PUBLISH(Q1, R0, D0),Topic=2da1c4a7-83c3ee2d/device/message/up/keep_alive, PacketId=16754Payload={“bv”:12378,“id”:“9ylIqemVET1YxHiZ”,“name”:“keep_alive”,“payload”:{“body”:{“timestamp”:1715070498}},“sn”:“2da1c4a7-83c3ee2d”,“timestamp”:1715070498,“version”:“1.0”}, , peername: 121.237.217.104:36359, tag: MQTT
2024-05-07T16:28:19.153105+08:00 [info] clientid: 2da1c4a7-83c3ee2d, ipaddr: {121,237,217,104}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 121.237.217.104:36359, source: file, topic: 2da1c4a7-83c3ee2d/device/message/up/keep_alive, username: <<“vzenith”>>
2024-05-07T16:28:19.153273+08:00 [debug] clientid: 2da1c4a7-83c3ee2d, line: 71, mfa: emqx_trace:publish/1, msg: publish_to, payload: {“bv”:12378,“id”:“9ylIqemVET1YxHiZ”,“name”:“keep_alive”,“payload”:{“body”:{“timestamp”:1715070498}},“sn”:“2da1c4a7-83c3ee2d”,“timestamp”:1715070498,“version”:“1.0”}, , peername: 121.237.217.104:36359, tag: PUBLISH, topic: 2da1c4a7-83c3ee2d/device/message/up/keep_alive
2024-05-07T16:28:19.153419+08:00 [debug] clientid: 2da1c4a7-83c3ee2d, line: 827, mfa: emqx_connection:serialize_and_inc_stats_fun/1, msg: mqtt_packet_sent, packet: PUBACK(Q0, R0, D0),PacketId=16754, ReasonCode=16, peername: 121.237.217.104:36359, tag: MQTT
2024-05-07T16:28:19.167828+08:00 [debug] clientid: 2da1c4a7-83c3ee2d, line: 781, mfa: emqx_connection:handle_incoming/2, msg: mqtt_packet_received, packet: PINGREQ(Q0, R0, D0), peername: 121.237.217.104:36359, tag: MQTT
2024-05-07T16:28:19.167987+08:00 [debug] clientid: 2da1c4a7-83c3ee2d, line: 827, mfa: emqx_connection:serialize_and_inc_stats_fun/1, msg: mqtt_packet_sent, packet: PINGRESP(Q0, R0, D0), peername: 121.237.217.104:36359, tag: MQTT
2024-05-07T16:28:19.246811+08:00 [debug] line: 781, mfa: emqx_connection:handle_incoming/2, msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0),ClientId=emqx_my1715066257440dev, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=90, Username=vzenith, Password=, peername: 122.112.238.240:55148, tag: MQTT
2024-05-07T16:28:19.247114+08:00 [debug] clientid: emqx_my1715066257440dev, line: 356, mfa: emqx_channel:handle_in/2, msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0),ClientId=emqx_my1715066257440dev, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=90, Username=vzenith, Password=
, peername: 122.112.238.240:55148, tag: MQTT
2024-05-07T16:28:19.247315+08:00 [debug] authenticator: <<“password_based:built_in_database”>>, clientid: emqx_my1715066257440dev, line: 674, mfa: emqx_authentication:authenticate_with_provider/2, msg: authenticator_result, peername: 122.112.238.240:55148, result: {ok,#{is_superuser => false}}, tag: AUTHN
2024-05-07T16:28:19.247469+08:00 [debug] clientid: emqx_my1715066257440dev, line: 246, mfa: emqx_authentication:authenticate/2, msg: authentication_result, peername: 122.112.238.240:55148, reason: chain_result, result: {stop,{ok,#{is_superuser => false}}}, tag: AUTHN
2024-05-07T16:28:19.247849+08:00 [debug] client_id: <<“emqx_my1715066257440dev”>>, clientid: emqx_my1715066257440dev, line: 155, mfa: emqx_cm:insert_channel_info/3, msg: insert_channel_info, peername: 122.112.238.240:55148
2024-05-07T16:28:19.248088+08:00 [debug] clientid: emqx_my1715066257440dev, line: 827, mfa: emqx_connection:serialize_and_inc_stats_fun/1, msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0),AckFlags=0, ReasonCode=0, peername: 122.112.238.240:55148, tag: MQTT
2024-05-07T16:28:19.252124+08:00 [debug] clientid: emqx_my1715066257440dev, line: 781, mfa: emqx_connection:handle_incoming/2, msg: mqtt_packet_received, packet: SUBSCRIBE(Q1, R0, D0),PacketId=439 TopicFilters=[$share/g1/+/device/message/up/ivs_result(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/up/snapshot(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/down/ivs_trigger/reply(#{nl => 0,qos => 0,rap => 0, rh => 0}),$share/g1/+/device/message/up/keep_alive(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/down/gpio_out/reply(#{nl => 0,qos => 0,rap => 0, rh => 0}),$share/g1/+/device/message/down/serial_data/reply(#{nl => 0,qos => 0,rap => 0, rh => 0}),$share/g1/+/device/message/down/set_time/reply(#{nl => 0,qos => 0,rap => 0, rh => 0}),$share/g1/+/device/message/down/snapshot/reply(#{nl => 0,qos => 0,rap => 0, rh => 0}),$share/g1/+/device/message/down/white_list_operator/reply(#{nl => 0,qos => 0, rap => 0,rh => 0}),$share/g1/+/device/message/up/gpio_in(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/up/serial_data(#{nl => 0,qos => 0,rap => 0,rh => 0}),$share/g1/+/device/message/down/get_device_timestamp/reply(#{nl => 0,qos => 0, rap => 0,rh => 0}),$share/g1/+/device/message/down/reboot_dev/reply(#{nl => 0,qos => 0,rap => 0, rh => 0}),$share/g1/+/device/message/down/set_cloud_ctrl/reply(#{nl => 0,qos => 0, rap => 0,rh => 0}),$share/g1/+/device/message/down/set_io_lock_status/reply(#{nl => 0,qos => 0, rap => 0,rh => 0}),$share/g1/+/device/message/down/get_io_lock_status/reply(#{nl => 0,qos => 0, rap => 0,rh => 0}),$share/g1/+/device/message/down/get_io_status/reply(#{nl => 0,qos => 0, rap => 0,rh => 0})], peername: 122.112.238.240:55148, tag: MQTT
2024-05-07T16:28:19.252526+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/up/ivs_result, username: <<“vzenith”>>
2024-05-07T16:28:19.252802+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/up/snapshot, username: <<“vzenith”>>
2024-05-07T16:28:19.253055+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/ivs_trigger/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.253285+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/up/keep_alive, username: <<“vzenith”>>
2024-05-07T16:28:19.253532+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/gpio_out/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.253751+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/serial_data/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.253962+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/set_time/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.254214+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/snapshot/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.254464+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/white_list_operator/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.254675+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/up/gpio_in, username: <<“vzenith”>>
2024-05-07T16:28:19.254941+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/up/serial_data, username: <<“vzenith”>>
2024-05-07T16:28:19.255171+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/get_device_timestamp/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.255399+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/reboot_dev/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.255654+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/set_cloud_ctrl/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.255876+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/set_io_lock_status/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.256080+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/get_io_lock_status/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.256301+08:00 [info] clientid: emqx_my1715066257440dev, ipaddr: {122,112,238,240}, line: 373, mfa: emqx_authz:log_allowed/1, msg: authorization_permission_allowed, peername: 122.112.238.240:55148, source: file, topic: +/device/message/down/get_io_status/reply, username: <<“vzenith”>>
2024-05-07T16:28:19.256557+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/up/ivs_result
2024-05-07T16:28:19.257051+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/up/snapshot
2024-05-07T16:28:19.257447+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/ivs_trigger/reply
2024-05-07T16:28:19.257776+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/up/keep_alive
2024-05-07T16:28:19.258107+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/gpio_out/reply
2024-05-07T16:28:19.258442+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/serial_data/reply
2024-05-07T16:28:19.258777+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/set_time/reply
2024-05-07T16:28:19.259224+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/snapshot/reply
2024-05-07T16:28:19.259614+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/white_list_operator/reply
2024-05-07T16:28:19.259937+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/up/gpio_in
2024-05-07T16:28:19.260309+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/up/serial_data
2024-05-07T16:28:19.260644+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/get_device_timestamp/reply
2024-05-07T16:28:19.260951+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/reboot_dev/reply
2024-05-07T16:28:19.261251+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/set_cloud_ctrl/reply
2024-05-07T16:28:19.261524+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/set_io_lock_status/reply
2024-05-07T16:28:19.261852+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/get_io_lock_status/reply
2024-05-07T16:28:19.262162+08:00 [debug] clientid: emqx_my1715066257440dev, line: 76, mfa: emqx_trace:subscribe/3, msg: subscribe, peername: 122.112.238.240:55148, sub_id: <<“emqx_my1715066257440dev”>>, sub_opts: #{nl => 0,qos => 0,rap => 0,rh => 0,share => <<“g1”>>,sub_props => #{}}, tag: SUBSCRIBE, topic: +/device/message/down/get_io_status/reply
2024-05-07T16:28:19.262467+08:00 [debug] clientid: emqx_my1715066257440dev, line: 827, mfa: emqx_connection:serialize_and_inc_stats_fun/1, msg: mqtt_packet_sent, packet: SUBACK(Q0, R0, D0),PacketId=439, ReasonCodes=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], peername: 122.112.238.240:55148, tag: MQTT

说明这个消费者的 TCP 协议栈的缓存已经满了,连接已经堵塞。可能的原因:

  1. 带宽过低
  2. 单个连接上短时间收到大量消息
  3. 客户端消费过慢,或者出了问题(死锁等)停止了从 TCP 协议栈读取消息