# Timeout on Serverless

**URL:** <https://community.hivemq.com/t/timeout-on-serverless/3664>\
**Category:** HiveMQ Cloud\
**Created:** [March 14, 2025, 11:20am UTC](https://community.hivemq.com/t/timeout-on-serverless/3664 "2025-03-14T11:20:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ratsea](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@Ratsea](https://community.hivemq.com/u/Ratsea)\
**Post date:** [March 14, 2025, 11:20am UTC](https://community.hivemq.com/t/timeout-on-serverless/3664/1 "2025-03-14T11:20:22Z")

</div>

Hello, I am trying to use a simple MQTT server to pass data from a remote IOT setup to my home. I am using a Soracom SIM as the internet connection.  
I send the data to Soracom via MQTT and it transfers the data to my HiveMQ MQTT account where I access and use at home. This is a raspberry pi with Node Red sending the data.  
This all works provided that I send the data every 5 mins. If I change this to 10 mins, the Hive servers generates a send error, which I presume is a Time Out problem.  
I have a workaround where I send a “msg.payload=true” every 5 minutes, and that seems to keep the connection alive.  
Is there a better method? I would prefer to reduce the data flow as I have a 25Mb per month limit with Soracom.  
Thanks

---

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [June 27, 2025, 8:38am UTC](https://community.hivemq.com/t/timeout-on-serverless/3664/2 "2025-06-27T08:38:39Z")

</div>

Hello @Ratsea

Welcome to HiveMQ Community Forum. Glad to see you are interested in MQTT and HiveMQ Cloud.  
You’re correct in identifying that the issue is likely related to the MQTT connection timing out when no data is sent for an extended period. Sending a `msg.payload=true` every 5 minutes is a valid workaround, but there’s a more efficient approach that can reduce your data usage.

We suggest configuring your MQTT client’s **keep-alive interval** to match your desired data transmission frequency. For example, setting the keep-alive to **600 seconds (10 minutes)** will ensure the connection is maintained without needing to send application-level messages.

Most MQTT clients, including Node-RED, automatically send lightweight **PINGREQ** messages within the keep-alive interval, which are only a few bytes in size, ideal for your 25MB/month Soracom limit.

Please let us know if you’d like assistance with configuring this or have any further questions.

Regards,  
Sheetal from HiveMQ team
