单机 创建客户端上限

本机环境 用的最新版本5.0.17,win10,i7-10750H,16G内存,java8

用的50个线程创建客户端,本地创建到16500左右,server端就崩溃 无法连接了
我这瓶颈是在哪块?

我要在win10环境下如何做单机的压力测试,不能换平台的情况下(要用winServer)。

你好,可以看下 log 目录下有没有生成 crash.dump 文件,有的话可以把前两百行的内容贴一下,我们可以看一下崩溃的原因。

image

2023-02-21T19:00:05.092000+08:00 [warning] msg: dropped_msg_due_to_mqueue_is_full, mfa: emqx_session:handle_dropped/3, line: 639, peername: 172.16.88.132:57733, clientid: mqttx_sub, topic: test/a/2619, payload: #{extra => [],flags => #{dup => false,retain => false},from => <<“mqttx_pub_4881405878”>>,headers => #{peerhost => {127,0,0,1},properties => #{},proto_ver => 4,protocol => mqtt,username => <<“pub_2602589268”>>},id => <<0,5,245,51,174,54,142,237,244,64,1,0,79,188,0,2>>,qos => 2,timestamp => 1676977198501,topic => <<“test/a/2619”>>}, queue: #{dropped => 15390,len => 1000,max_len => 1000,store_qos0 => true}
2023-02-21T19:00:05.092000+08:00 [warning] msg: dropped_msg_due_to_mqueue_is_full, mfa: emqx_session:handle_dropped/3, line: 639, peername: 172.16.88.132:57733, clientid: mqttx_sub, topic: test/a/159, payload: #{extra => [],flags => #{dup => false,retain => false},from => <<“mqttx_pub_3857482770”>>,headers => #{peerhost => {127,0,0,1},properties => #{},proto_ver => 4,protocol => mqtt,username => <<“pub_7562959188”>>},id => <<0,5,245,51,174,54,142,135,244,64,1,0,79,182,0,2>>,qos => 2,timestamp => 1676977198501,topic => <<“test/a/159”>>}, queue: #{dropped => 15391,len => 1000,max_len => 1000,store_qos0 => true}
2023-02-21T19:00:05.092000+08:00 [warning] msg: dropped_msg_due_to_mqueue_is_full, mfa: emqx_session:handle_dropped/3, line: 639, peername: 172.16.88.132:57733, clientid: mqttx_sub, topic: test/a/2439, payload: #{extra => [],flags => #{dup => false,retain => false},from => <<“mqttx_pub_1516596046”>>,headers => #{peerhost => {127,0,0,1},properties => #{},proto_ver => 4,protocol => mqtt,username => <<“pub_9104289573”>>},id => <<0,5,245,51,174,54,143,84,244,64,1,0,79,185,0,2>>,qos => 2,timestamp => 1676977198501,topic => <<“test/a/2439”>>}, queue: #{dropped => 15392,len => 1000,max_len => 1000,store_qos0 => true}
2023-02-21T19:00:05.092000+08:00 [warning] msg: dropped_msg_due_to_mqueue_is_full, mfa: emqx_session:handle_dropped/3, line: 639, peername: 172.16.88.132:57733, clientid: mqttx_sub, topic: test/a/1059, payload: #{extra => [],flags => #{dup => false,retain => false},from => <<“mqttx_pub_6382478412”>>,headers => #{peerhost => {127,0,0,1},properties => #{},proto_ver => 4,protocol => mqtt,username => <<“pub_5246252741”>>},id => <<0,5,245,51,174,54,143,84,244,64,1,0,79,187,0,2>>,qos => 2,timestamp => 1676977198501,topic => <<“test/a/1059”>>}, queue: #{dropped => 15393,len => 1000,max_len => 1000,store_qos0 => true}
2023-02-21T19:00:05.092000+08:00 [warning] msg: dropped_msg_due_to_mqueue_is_full, mfa: emqx_session:handle_dropped/3, line: 639, peername: 172.16.88.132:57733, clientid: mqttx_sub, topic: test/a/759, payload: #{extra => [],flags => #{dup => false,retain => false},from => <<“mqttx_pub_1436047486”>>,headers => #{peerhost => {127,0,0,1},properties => #{},proto_ver => 4,protocol => mqtt,username => <<“pub_3801366212”>>},id => <<0,5,245,51,174,54,143,186,244,64,1,0,79,186,0,2>>,qos => 2,timestamp => 1676977198501,topic => <<“test/a/759”>>}, queue: #{dropped => 15394,len => 1000,max_len => 1000,store_qos0 => true}
2023-02-21T19:00:05.093000+08:00 [warning] msg: dropped_msg_due_to_mqueue_is_full, mfa: emqx_session:handle_dropped/3, line: 639, peername: 172.16.88.132:57733, clientid: mqttx_sub, topic: test/a/1539, payload: #{extra => [],flags => #{dup => false,retain => false},from => <<“mqttx_pub_5815921651”>>,headers => #{peerhost => {127,0,0,1},properties => #{},proto_ver => 4,protocol => mqtt,username => <<“pub_7776412528”>>},id => <<0,5,245,51,174,54,143,186,244,64,1,0,79,181,0,2>>,qos => 2,timestamp => 1676977198501,topic => <<“test/a/1539”>>}, queue: #{dropped => 15395,len => 1000,max_len => 1000,store_qos0 => true}
2023-02-21T19:00:09.036000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:00:16.985000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:00:19.058000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:00:34.065000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:00:36.107000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:00:39.093000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:00:51.122000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:00:53.193000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:01:08.196000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:01:09.096000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:01:10.266000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:01:25.282000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:01:27.348000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:01:39.176000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:01:42.365000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:01:44.416000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:01:59.424000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:02:01.492000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:02:09.188000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:02:16.495000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:02:18.559000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:02:33.571000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:02:35.626000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:02:39.261000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:02:50.643000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:02:52.709000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:03:07.720000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:03:09.263000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:03:09.794000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:03:24.795000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:03:26.852000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:03:39.325000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:03:41.865000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:03:43.937000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:03:58.950000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:04:01.011000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:04:09.335000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:04:16.027000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:04:18.100000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:04:33.111000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:04:35.181000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:04:39.397000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:04:50.193000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:04:52.253000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:05:07.268000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:05:09.333000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:05:09.407000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:05:24.347000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:05:26.403000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:05:39.471000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:05:41.414000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:05:43.481000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:05:58.496000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:06:00.568000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:06:09.474000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:06:15.583000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:06:17.640000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:06:32.656000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:06:34.722000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:06:39.528000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:06:49.735000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:06:51.780000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:07:06.783000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:07:08.866000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:07:09.535000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:07:23.874000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:07:25.942000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:07:39.617000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:07:40.954000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:07:43.004000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:07:58.012000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:08:00.064000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:08:09.619000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:08:15.078000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:08:17.152000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:08:32.160000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:08:34.213000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:08:39.682000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:08:49.221000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:08:51.281000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:09:06.296000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:09:08.366000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:09:09.685000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:09:23.382000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:09:25.464000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:09:39.756000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:09:40.473000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:09:42.544000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:09:57.546000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:09:59.599000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:10:09.759000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:10:14.616000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:10:16.684000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:10:31.695000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:10:33.747000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:10:39.841000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:10:48.764000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:10:50.819000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:11:05.835000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:11:07.900000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:11:09.848000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:11:22.916000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:11:24.979000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:11:39.909000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:11:39.987000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:11:42.043000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:11:57.059000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:11:59.116000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:12:09.910000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:12:14.127000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:12:16.200000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:12:31.202000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:12:33.270000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:12:39.975000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:12:48.286000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:12:50.357000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:13:05.371000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:13:07.443000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:13:09.979000+08:00 [warning] OS_MON (cpu_sup) called by <0.2343.0>, unavailable
2023-02-21T19:13:22.449000+08:00 [warning] OS_MON (cpu_sup) called by <0.2240.0>, unavailable
2023-02-21T19:13:24.503000+08:00 [error] msg: post_to_push_gateway_failed, mfa: emqx_prometheus:push_to_push_gateway/3, line: 136, error: {error,{failed_connect,[{to_address,{“127.0.0.1”,9091}},{inet,[inet],econnrefused}]}}, headers: [], url: http://127.0.0.1:9091/metrics/job/emqx/instance/emqx~127.0.0.1
2023-02-21T19:13:35.327000+08:00 [error] msg: async_submit_error, mfa: emqx_pool:handle_cast/2, line: 120, exception: error, reason: badarg, stacktrace: [{ets,delete_object,[emqx_channel,{<<“mqttx_pub_1877321317”>>,<0.30619.0>}],[{error_info,#{cause => id,module => erl_stdlib_errors}}]},{emqx_cm,do_unregister_channel,1,[{file,“emqx_cm.erl”},{line,185}]},{lists,foreach,2,[{file,“lists.erl”},{line,1342}]},{emqx_pool,handle_cast,2,[{file,“emqx_pool.erl”},{line,112}]},{gen_server,try_dispatch,4,[{file,“gen_server.erl”},{line,695}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,771}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,236}]}]

看起来确实有很多报文日志,但基本都是比较普通的问题,比如消息队列满了,然后开始丢弃消息了;你配置的 Prometheus 服务无法连接等等。

但这些都不会导致 EMQX 崩溃。方便把完整的 emqx.log.* 发一下吗?

服务器上用的老版本,所以我本地新旧2个版本都测了的,我把两份日志都给你吧

emqx log.zip (1.6 MB)

有什么发现吗?是跟我本地哪块用法有关系吗?

你给的日志是 EMQX 发生崩溃的机器上的日志吗?

对的

日志里面没有更多的信息,怀疑是占用内存过多被操作系统 Kill 了,你可以看下操作系统的系统日志。

我观察了很多次控制台,EMQX后台内存占用管理的很好,一般都在500兆左右,但CPU占用倒是会随着客户端连接数量增大而增大。


是看这里的日志还是看哪块位置的?

日志名称: Application
来源: Microsoft-Windows-Security-SPP
日期: 2023.2.21 10:18:25
事件 ID: 16394
任务类别: 无
级别: 信息
关键字: 经典
用户: 暂缺
计算机: NeGan
描述:
脱机下级迁移成功。
事件 Xml:



16394
0
4
0
0
0x80000000000000

176246


Application
NeGan




日志名称: Application
来源: Windows Error Reporting
日期: 2023.2.21 16:46:39
事件 ID: 1001
任务类别: 无
级别: 信息
关键字: 经典
用户: 暂缺
计算机: NeGan
描述:
故障存储段 126110318729,类型 5
事件名称: ScriptedDiagFailure
响应: 不可用
Cab ID: 0

问题签名:
P1: Microsoft Windows.NetworkDiagnostics.4.0
P2: 2245307828
P3: 1.0.0.0
P4: Default
P5:
P6:
P7:
P8:
P9:
P10:

附加文件:
\?\C:\Users\NeGan\AppData\Local\Temp\msdt_04496F56-22B4-492F-B0A2-485562B7C67A_\PkgCCDA.cab
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD39.tmp.WERInternalMetadata.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD49.tmp.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD47.tmp.csv
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD68.tmp.txt

可在此处获取这些文件:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\NonCritical_Microsoft Window_86b27e64bbea3a3961de913c2a0a61ae2ea1b_00000000_b37f2612-72ed-4d9e-b0b6-39d8e2143f95

分析符号:
重新检查解决方案: 0
报告 ID: b37f2612-72ed-4d9e-b0b6-39d8e2143f95
报告状态: 268435558
哈希存储段: 52526d9ca2101c068cbbb40de4097e3c
Cab GUID: 0
事件 Xml:



1001
0
4
0
0
0x80000000000000

176292


Application
NeGan



126110318729
5
ScriptedDiagFailure
不可用
0
Microsoft Windows.NetworkDiagnostics.4.0
2245307828
1.0.0.0
Default













\?\C:\Users\NeGan\AppData\Local\Temp\msdt_04496F56-22B4-492F-B0A2-485562B7C67A_\PkgCCDA.cab
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD39.tmp.WERInternalMetadata.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD49.tmp.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD47.tmp.csv
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCD68.tmp.txt
\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\NonCritical_Microsoft Window_86b27e64bbea3a3961de913c2a0a61ae2ea1b_00000000_b37f2612-72ed-4d9e-b0b6-39d8e2143f95


0
b37f2612-72ed-4d9e-b0b6-39d8e2143f95
268435558
52526d9ca2101c068cbbb40de4097e3c
0

我本地用4.2.0在8174左右客户端数量后崩溃,用5.0.17在16324左右客户端数量后崩溃,这最新版本是在哪块做了显著优化吗?我们也想知道,windows环境下使用EMQX的瓶颈到底是在哪里?我们也可以自行尝试优化这块或者规避瓶颈问题。

是不是文件描述符占用达到最大限制了?

这个我就有点听不懂了,你可以告诉我改哪里的配置,我本地可以反复测试观察的 比较方便。

如果有什么分析结果的进展 及时回复我,我们还准备先在win10上优化看看效果的,然后再去winServer上试试。

你好,还是建议在 Linux 环境中部署 EMQX。

那我用emqtt-bench测试单机的话,上限就只能是65000?

再补充一个现象,在win10下连接最近版,连接到16300左右 win10的机器会断网 服务端状态正常,只有把本地的多线程创建客户端的程序关闭了win10的机器才能上网。

可以通过增加网卡 虚拟ip 和 更多的监听端口来超过 65000 的限制

image
我单机docker启动最多28230,不知道为啥这么稳定,系统连接数没问题,测试别的应用可以到60000

windows启动没问题,可能是docker容器限制的问题