Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] mosquitto sometimes disconnects client after publish

I'm running a mosquitto broker (1.4.10) on AWS behind a ELB. I wrote a client that publishes batches of messages to a single topic. For example, it may send 20 messages of about 5k each, and repeat that every minute.

The first batch of messages always goes through, but subsequent batches are either completely missing or partially missing. I noticed that after a failed batch of messages is published, the client gets disconnected. I can see the TCP reset in the packet capture from the client side. Even though there are no publishing errors, and the disconnect seems to occur AFTER publishing the 2nd batch, the 2nd batch of messages doesn't show up on the broker.

I'm unable to reproduce this running mosquitto locally, which makes it seem like it's a problem with mosquitto specific to AWS or the load balancer. My first thought was that the load balancer was timing out the connections, but the timeout on ELB is 60s, and I set the client keepalive to 5s and the problem persists.

Any ideas?

Thanks,
Jeff
--
Jeff Armstrong
Software Engineer
Greenfield Labs

Back to the top