exhook grpc并发测试,grpc一小部分调用报错

环境信息

  • EMQ X 版本:4.3.5
  • 操作系统及版本:linux
  • 其他

问题描述

emqx 开启exhook 钩子扩展。
使用压力测试工具发并发并发布12000条消息。
测试结果是:grpc 的服务端一般只收到1万个条调用,即只触发了OnMessagePublish 1万多次。差1千多次调用。
查看emqx的日志如下
主要报错是:
1.{connection_down,{error,{connection_error,frame_size_error,'RST_STREAM frames MUST be 4 bytes wide. (RFC7540 6.4)
2.throw an exception: timeout, stacktrace:

配置文件及日志

2021-07-30T14:31:11.492336+08:00 [error] backend-test-2271-1627626639@10.0.1.130:60148 [ExHook Svr] CALL emqx_exhook_v_1_hook_provider_client:on_message_publish(#{message => #{from => <<"backend-test-2271-1627626639">>,id => <<"0005C8515D92FC4FE32A2D003E6B0001">>,node => <<"emqx@10.0.1.7">>,payload => <<"test">>,qos => 1,timestamp => 1627626671373,topic => <<"/test/hhh">>}}, #{channel => "default"}) error: {connection_down,{error,{connection_error,frame_size_error,'RST_STREAM frames MUST be 4 bytes wide. (RFC7540 6.4)'}}}
2021-07-30T14:31:11.932462+08:00 [error] backend-test-3-1627626639@10.0.1.130:55751 [ExHook Svr] CALL emqx_exhook_v_1_hook_provider_client:on_message_publish(#{message => #{from => <<"backend-test-3-1627626639">>,id => <<"0005C8515D4F35F5E32A2C0071390001">>,node => <<"emqx@10.0.1.7">>,payload => <<"test">>,qos => 1,timestamp => 1627626666931,topic => <<"/test/hhh">>}}, #{channel => "default"}) throw an exception: timeout, stacktrace: {gen_server,call,[<0.10248.0>,{read,#Ref<0.1131144061.3037462530.227856>,1627626671931},5000]}

TPS 和机器的配置信息有么

请忽略。已经解决
之前将grpc的托管在http 服务上的,就有报错
现在改回类示示例代码的。直接开一个tcp 端口。
参考示例代码emqx的go语言代码