-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Responding to webhook causes emqx to drop connections #131
Comments
In your case, there are 80 connections lost, it is very weird, could you please give me more details? For example, the emqx version and the log file. |
EMQX version is v3.0-rc.5. Which log file do you need? |
I am experiencing a similar problem with the webhook plugin running. Currently I cannot trigger the behaviour at will, but the client is connected and at some point the emqx server disconnects the client. The webhook body of the device disconnecting is:
and /opt/emqx/log/emqx.log.1 shows
The client is written in python and uses the paho-mqtt==1.4.0 package. After that I see this webhook every 3 to 4 seconds of the device connecting
and emqx server showing the same two errors on the log I am using emqx/emqx:v3.1.2 on kubernetes, a few instances on a cluster created with the kubernetes apiserver. Thanks very much in advance for your help and hard work. |
We are also having this issue. It seems like this plugin is making the requests synchronously. Maybe the author (or someone that knows Erlang :)) could have this plugin to send the http request asynchronously instead, so it doens't block any processing. |
Hi @gilbertwong96 thanks |
It never really worked for us @gilbertwong96, In the end, we disabled the webhook altogether and created a specific topic where the device itself would report to be connected, and set an LW&T to change that value to connected: false when disconnected. Another option could be to listen to the connected and disconnected topics that EMQX provides. Although it's not a broker-agnostic implementation, the webhook was not either. Thanks for any feedback you can give us on this one! |
Hi guys, sorry for the late reply. In the current implementation, The way it does in synchronous sending HTTP requests, But no matter how it won't have so many stability problems. @lcofre the But, the Thanks for your feedback there. |
@HJianBo |
Indeed. We may release it in version 4.3.0. |
I have an emqx broker set up and have the webhook plugin pointed at another server running node .js with express. I have about 630 devices connected to the emqx broker with a throughput of ~60 messages a second ( each device sending a message every 10 seconds). When I have have my node server send back a status with res.sendStatus(200) but if i send the I see that my connections drop from 630 to around 550. Would this be a timeout issue where my server is taking too long to respond? I'm unsure why the webhook plugin is making my emqx broker unstable
The text was updated successfully, but these errors were encountered: