Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pause Xms due to rate limit warning #9096

Closed
cimplart opened this issue Oct 5, 2022 · 1 comment
Closed

Pause Xms due to rate limit warning #9096

cimplart opened this issue Oct 5, 2022 · 1 comment
Assignees
Labels

Comments

@cimplart
Copy link

cimplart commented Oct 5, 2022

What happened?

Would it be possible to downgrade logs like

[MQTT] Pause 125ms due to rate limit

to notice or info level?

In my setup it is expected that clients will dump topics with a high rate, and the rate limit is purposeful to slow them down on the broker side. However, with the default log level it generates a lot of warnings in the emqx log. This generates additional burden on the system and the log storage.
The only solution I see now is to set the global log level to error, but this will prevent the application to collect other useful warnings.
The best solution would be to add a new option that would set the log level of rate limit hit events in the configuration.

What did you expect to happen?

I expected to see the rate limit logs at a lower log level like info, because they may occur with high frequency.

How can we reproduce it (as minimally and precisely as possible)?

Set the options
EMQX_ZONE__EXTERNAL__PUBLISH_LIMIT=8,1s
EMQX_LISTENER__TCP__EXTERNAL__ACTIVE_N=8

and publish more than 8 topics in a row to the broker.

Anything else we need to know?

No response

EMQX version

$ ./bin/emqx_ctl broker
sysdescr  : EMQ X Broker
version   : 4.3.19

OS version

NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04

Linux lvm-cluster-2 5.15.0-1019-azure #24~20.04.1-Ubuntu SMP Tue Aug 23 15:52:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Log files

emqx_stack_emqx.0.mqki0xw8mwxz@lvm-cluster-0 | {"time":1664960424365941,"pid":"<0.14256.0>","peername":"192.168.177.13:37374","msg":"[MQTT] Pause 125ms due to rate limit","line":765,"level":"warning","gl":"<0.1580.0>","clientid":"TcmKrLMhlXjS","mfa":"emqx_connection:ensure_rate_limit/2"} emqx_stack_emqx.0.mqki0xw8mwxz@lvm-cluster-0 | {"time":1664960424367270,"pid":"<0.17688.0>","peername":"192.168.177.14:24920","msg":"[MQTT] Pause 125ms due to rate limit","line":765,"level":"warning","gl":"<0.1580.0>","clientid":"6Aj15uqL4g0s","mfa":"emqx_connection:ensure_rate_limit/2"} emqx_stack_emqx.0.mqki0xw8mwxz@lvm-cluster-0 | {"time":1664960424370123,"pid":"<0.13538.0>","peername":"192.168.177.14:6350","msg":"[MQTT] Pause 125ms due to rate limit","line":765,"level":"warning","gl":"<0.1580.0>","clientid":"Ek8WUVnQLFmZ","mfa":"emqx_connection:ensure_rate_limit/2"} emqx_stack_emqx.0.mqki0xw8mwxz@lvm-cluster-0 | {"time":1664960424370944,"pid":"<0.11905.0>","peername":"192.168.177.14:3838","msg":"[MQTT] Pause 125ms due to rate limit","line":765,"level":"warning","gl":"<0.1580.0>","clientid":"9RZyJoKLCwat","mfa":"emqx_connection:ensure_rate_limit/2"} emqx_stack_emqx.0.mqki0xw8mwxz@lvm-cluster-0 | {"time":1664960424372040,"pid":"<0.13593.0>","peername":"192.168.177.13:49974","msg":"[MQTT] Pause 125ms due to rate limit","line":765,"level":"warning","gl":"<0.1580.0>","clientid":"bjV1HhdLFRu6","mfa":"emqx_connection:ensure_rate_limit/2"} emqx_stack_emqx.0.mqki0xw8mwxz@lvm-cluster-0 | {"time":1664960424375184,"pid":"<0.14148.0>","peername":"192.168.177.14:53960","msg":"[MQTT] Pause 125ms due to rate limit","line":765,"level":"warning","gl":"<0.1580.0>","clientid":"dsnyzl8b4LAi","mfa":"emqx_connection:ensure_rate_limit/2"} emqx_stack_emqx.0.mqki0xw8mwxz@lvm-cluster-0 | {"time":1664960424376518,"pid":"<0.13470.0>","peername":"192.168.177.14:6314","msg":"[MQTT] Pause 875ms due to rate limit","line":765,"level":"warning","gl":"<0.1580.0>","clientid":"mT4nxz1L9qaA","mfa":"emqx_connection:ensure_rate_limit/2"}
@id
Copy link
Collaborator

id commented Oct 12, 2022

The patch is merged, fix will be available in the next release.

@id id closed this as completed Oct 12, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants