Skip to main content
Carifly title
Link

MQTT Connection usingUsing Keep-Alive > 5 minutes behaves inconsistentlyMinutes Silently Disconnects on Azure VM Broker?

Included OP info from comments
Source Link
Helmar
  • 8.4k
  • 6
  • 36
  • 84

Summary of the issue:

  1. Connecting to test.mosquitto.org or iot.eclipse.org with a keep alive of more than 5 minutes, and everything seems to work just as expected.

  2. Connecting to my broker (both on Azure hosted VMs - one is Mosquitto and one is Emqttd), my clients don't send a ping if the keep-alive is longer than 5 minutes. They just die. The broker disconnects them eventually for not pinging. I'm not using an Azure load balancer, I'm connecting directly to the VM).

The thing is, the connected device doesn't know it's been disconnected if its over a cell network (not sure why?)

Over an Ethernet network, it'll reconnect itself as it should.

Not sure if there is something unique about the Azure VM's that is causing my disconnection/timeout issue with longer keep-alives?

Lastly, if I use a 2 minutes or shorter keep-alive, everything works.

Summary of the issue:

  1. Connecting to test.mosquitto.org or iot.eclipse.org with a keep alive of more than 5 minutes, and everything seems to work just as expected.

  2. Connecting to my broker (both on Azure hosted VMs - one is Mosquitto and one is Emqttd), my clients don't send a ping if the keep-alive is longer than 5 minutes. They just die. The broker disconnects them eventually for not pinging.

The thing is, the connected device doesn't know it's been disconnected if its over a cell network (not sure why?)

Over an Ethernet network, it'll reconnect itself as it should.

Not sure if there is something unique about the Azure VM's that is causing my disconnection/timeout issue with longer keep-alives?

Lastly, if I use a 2 minutes or shorter keep-alive, everything works.

Summary of the issue:

  1. Connecting to test.mosquitto.org or iot.eclipse.org with a keep alive of more than 5 minutes, and everything seems to work just as expected.

  2. Connecting to my broker (both on Azure hosted VMs - one is Mosquitto and one is Emqttd), my clients don't send a ping if the keep-alive is longer than 5 minutes. They just die. The broker disconnects them eventually for not pinging. I'm not using an Azure load balancer, I'm connecting directly to the VM).

The thing is, the connected device doesn't know it's been disconnected if its over a cell network (not sure why?)

Over an Ethernet network, it'll reconnect itself as it should.

Not sure if there is something unique about the Azure VM's that is causing my disconnection/timeout issue with longer keep-alives?

Lastly, if I use a 2 minutes or shorter keep-alive, everything works.

edited title
Link
Bence Kaulics
  • 7.8k
  • 8
  • 42
  • 90

MQTT Connection Usingusing Keep-Alive > 5 Minutes Behaves Inconsistentlyminutes behaves inconsistently?

added 2 characters in body; edited title
Source Link
Bence Kaulics
  • 7.8k
  • 8
  • 42
  • 90
Loading
adding tags
Link
Loading
clarity
Source Link
Loading
Source Link
Loading