Server disconnected after hour

Hi,
I have a problem where my client connects to cloud broker HiveMQ. It works perfectly for hour and after that, the server disconnected automatically. It’s related to timeout or keepalive. How I setting it on the client. I am using python on the client side. As we know, cloud brokers in HiveMQ are using Amazon. Any ideas?

Regards,

Hello

Welcome to the HiveMQ Community forum. Glad to see you’re taking interest in HiveMQ and MQTT.

As you are using the Python library you will need to contact the Python mailing list to help you further.

I have checked with HiveMQ Cli client and it has setting sessionExpiryInterval which allows clients to stay connected for the specified time.

Kind regards,
Sheetal

Yes I am using python library. Wait, what version of cloud hivemq used. 3.1.1 or 5.0. And also how I called python mailing list.

Actually I want to connect my client to broker for 24/7 and I found after several hour its disconnected automatically. I need to rerun the python file to send data back. So to solve this problem I just declare sessionExpireInterval on my python code? Or that thing on server side?