[
Date Prev][
Date Next][
Thread Prev][Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] MQTT error [-11] during publish after KeepAlive is over during an ongoing publish
|
kunal takalkar via paho-dev <paho-dev@xxxxxxxxxxx> writes:
> I am getting an *MQTT error [-11]* while publishing *a message of ~5MB*
> which corresponds to `MQTTASYNC_OPERATION_INCOMPLETE`.
> This is when my *keepalive* interval is over (in this case I have used
> *20secs*). It reconnects back after a bit, but the *ongoing publish fails*.
> I have *attached the logs* as well as the modified example.
How long does it take to transfer 5 MB? 5 MB is very large, and I am
not suprrised you are having trouble.
20s is an extremely short keepalive interval. I view even 60s as aggressive.
> 1. Isn't the connection alive while a large payload is being sent to the
> server if no other ping is explicitly sent by the client?
Good question, but the real question is not soem abstract notion of
alive but how the server behaves. Normally, people use reasonable
intervals and send reasonable amounts of data. I'd expect the
successful reception of a command (publish, subscribe) to reset the
timer. I would not expect intermediate data reads to do so, even
though perhaps they could.
> 2. Isn't paho keeping the connection alive by sending pings internally?
A client will send a ping when the client's timer expires, but probably
only when some other command is not in progress.
> 3. Is there any feature already implemented to resume the ongoing publish
> call after the reconnect? If not, is there any plan to do so?
I have no idea if the spec even has such a notion.
> Please let me know if my understanding is wrong on any of the things
> mentioned above.
I think you are off in that you are sending huge messages with a
keepalive that is too short and expeecting it to work. My advice is
figure out how long the publish takes when the network is not so happy,
and set the keepalive to 10x that.
>
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev