-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Timeout Exceeded Disconnect when timeout has not been exceeded #2124
Comments
The only reason you will get that message is if the last time the broker received a message is more than 1.5 times the keepalive value set by the client. That's it. You say you can change how often your client sends a PINGREQ - is that actually the keepalive value you are changing? If so, then setting a lower value actually makes it easier for your client to time out. 15*1.5 = 22 seconds though, which is still a long time. Do you have any broker logs that could confirm/deny what is happening? A log with |
I figured that would be the only reason I would get a timeout error, that's why I'm so confused.
I let it run overnight to see if anything funny happened;
B: Here was my testing earlier in the day where I trigger one of the alarms on the device:
As you can see, the device "timed out" after about 30 seconds (this is when I triggered the alarm), but in the other logs you can see the device seems to run, relatively, ok without disconnecting from a timeout To clarify: iCE_Test_CPT and 860688042114364 are the same device, I suspected a Client ID conflict issue so I changed the Client ID to rule that out |
OK so I found out what the issue is: The Device is sending data via SIM card, when the alarm is triggered the device also sends out an SMS alert. Weird that it comes up as a timeout on the logs though |
This is your client connecting with a keepalive value of 10 ( In other words, you need to change your client settings so that the keepalive and PINGREQ interval match. That could be increasing the keepalive to 15, decreasing the PINGREQ interval to 10, or setting them both to something else entirely. If you can only change the PINGREQ interval and the client itself calculates the keepalive from that, or vice versa, then you'll have to go and complain to wherever you got the client from. |
Ahhhhh! |
What could cause a timeout exceeded disconnect, that isn't actually a timeout exceeded disconnect?
I have a device that acts as the client to my Mosquitto Broker.
I have no control over the client MQTT settings except for:
-How often it publishes
-The Topic it Publishes
-How often it will send a PINGREQ
I currently have it sending a PINGREQ every 15s and it publishes every minute, it also publishes if any of the alarms on the device are triggered.
Funny thing is, I get a
Client mqttClient has exceeded timeout, disconnecting.
error when one of the alarms set's itself back to normal. It can't be a timeout error as the PINGREQ is very aggressive and keeps that connection alive;So I'm asking if there is anything else, that could be triggering the error and forcing the device to disconnect?
The text was updated successfully, but these errors were encountered: