Skip to content

clients disconnected with the new keepalive algorithm #3286

Closed
@jesferman

Description

@jesferman

After updating mosquitto to v2.0.21 I get my clients randomly disconnected either at:

  • Connection time
  • After a random time

With the following message:

1749570348: New connection from 127.0.0.1:45268 on port 8883.
1749570348: Client <unknown> has exceeded timeout, disconnecting.

I tested it in previous versions and it didn't happened. I have been using my mqtt clients for months without this problem.

It seems related to the new keepalive algorithm backported to v2.0.21 by @ralight. See the end of this issue: #3138.

Important: it only happens if you set a max_keepalive value in mosquitto.conf (for my tests I use 60s). If you don't set the parameter, the error doesn't happen.

To reproduce it, set a max_keepalive value in your mosquitto.conf and use mosquitto_pub to send a test command. Repeat the mosquitto_pub command a few times and the error happens approx 1 out of 10 times.

Let me know if you need more information or I can help testing. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: AvailableNo one has claimed responsibility for resolving this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions