eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.19k stars 723 forks source link

Call for help - Client stalls after a number of messages are received #711

Closed FilhoRicardo closed 9 months ago

FilhoRicardo commented 1 year ago

hi all, sorry if here is not the correct place to ask this, if not please can you direct me to the correct place? basically I created a script in python that connects to a mosquitto broker that is connected to Niagara, and I have a list of topics I want to subscribe to. every time I get a new message I look at the topic and decide if I want to save a copy of the message or not. Right now I am using a list where I append a tuple with the topic and message body, whenever the length of the list is 300 I save all the messages on my hard disk. however the code just stalls after it sees 1400ish messages and no errors are raised. do you have any debugging suggestions?

kalmastenitin commented 1 year ago

can you share more details about this? any error/message log will be helpful

FilhoRicardo commented 1 year ago

Hi, unfortunately one of the major issues for me is the lack of error messages. I am dealing with a lot of sensitive data I can not share, however I am sharing the code I am using to download messages from the broker. In summary, I have a script that connects to a mosquitto broker, and this broker is receiving messages from Niagara. My task is to check if messages are compliant with a standard I created. The compliance check is Ok, but the downloading of the messages is weird. the code just stalls after a while, i did change the keep_alive on my script and got the code stalling when there was 192 secs missing (ka = 15s), 168secs(ka = 30s) and 120secs(ka =60s)

[image: image.png]

that is what I get, just this message. one more detail, I am attaching the code I wrote, if within the while loop I print a message, this message is printed over and over again until the timeout is reached.

thanks :) ricardo

On Tue, 28 Mar 2023 at 14:15, kalmastenitin @.***> wrote:

can you share more details about this? any error/message log will be helpful

— Reply to this email directly, view it on GitHub https://github.com/eclipse/paho.mqtt.python/issues/711#issuecomment-1486868916, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6VZ7JQTRHZ26E5Q725IKOLW6LP67ANCNFSM6AAAAAAWE4ZLYU . You are receiving this because you authored the thread.Message ID: @.***>

FilhoRicardo commented 1 year ago

I believe I found the solution, would you like to discus it? thanks

On Tue, 28 Mar 2023 at 17:56, Ricardo Filho @.***> wrote:

Hi, unfortunately one of the major issues for me is the lack of error messages. I am dealing with a lot of sensitive data I can not share, however I am sharing the code I am using to download messages from the broker. In summary, I have a script that connects to a mosquitto broker, and this broker is receiving messages from Niagara. My task is to check if messages are compliant with a standard I created. The compliance check is Ok, but the downloading of the messages is weird. the code just stalls after a while, i did change the keep_alive on my script and got the code stalling when there was 192 secs missing (ka = 15s), 168secs(ka = 30s) and 120secs(ka =60s)

[image: image.png]

that is what I get, just this message. one more detail, I am attaching the code I wrote, if within the while loop I print a message, this message is printed over and over again until the timeout is reached.

thanks :) ricardo

On Tue, 28 Mar 2023 at 14:15, kalmastenitin @.***> wrote:

can you share more details about this? any error/message log will be helpful

— Reply to this email directly, view it on GitHub https://github.com/eclipse/paho.mqtt.python/issues/711#issuecomment-1486868916, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6VZ7JQTRHZ26E5Q725IKOLW6LP67ANCNFSM6AAAAAAWE4ZLYU . You are receiving this because you authored the thread.Message ID: @.***>

kalmastenitin commented 1 year ago

Yes please

MattBrittan commented 9 months ago

Closing this issue due to inactivity (and it looks like a solution was found). With issues like this logs are very helpful.