EMQX is a popular MQTT Broker widely used in the Internet of Things(IoT), Industrial IoT (IIoT) and Connected Cars. It can connect millions of devices at scale, move and process your IoT data in real-time anywhere with high performance, scalability and reliability.
In this blog series, we will explore common troubleshooting scenarios when using EMQX and provide practical tips and solutions to overcome them. Readers can optimize your MQTT deployment and ensure smooth communication between your devices following this troubleshooting instruction.
Introduction
Regarding client connections, we may encounter problems such as connection failures, frequent disconnections, or the challenge of testing the upper limit of many connections. This article will introduce how to analyze and locate these problems and provide some optimization suggestions.
Abnormal Disconnection Problems
Abnormal disconnection is a common problem that can be caused by unstable networks, client code issues, or server problems.
- Unstable Network: An unstable network is one of the most common reasons for the frequent disconnection of EMQX clients, In such instances, clients may experience delays in receiving timely responses from the server, resulting in abrupt disconnections.
- Client Code Issues: There may be bugs or misconfigurations in the client code, causing the client to disconnect frequently.
- Server Problems: The server may have problems such as high load or misconfiguration.
For connection problems such as client connection failures and frequent disconnections, we can use EMQX's log trace function to troubleshoot the specific disconnection reasons of the client.
- You can enable the log trace in the EMQX Dashboard.
- After clicking "create", select "ClientID" as the type;
- Fill in the ClientID information that needs to be tracked (must be accurate ClientID);
- Select the start and end time. If the start time is less than or equal to the current time, it will start from the current time by default.
- The trace record created successfully can be seen in the list. You can view the log directly in dashboard or download and view it locally.


Top comments (0)