HTTP POST fails at large payload

I am encountering a strange malfunction of Ruuvi gateway on firmware 1.24.4. The gateway send first/couple of HTTP POST correctly to customer server, but it fails after that. There are about 60-70 BLE devices around the office. So the payload is a bit big. log is as below:
I (434553) http: [adv_post_task/1] ### HTTP POST to URL=http://192.168.202.237:7071/api/Ruuvi/GW_VAASA
I (434555) http: [adv_post_task/1] HTTP POST DATA:
…
data payload here
…

I (435145) TRANS_TCP: [adv_post_task] hostname ‘192.168.202.237’ resolved to 192.168.202.237
E (435257) http: [adv_post_task/1] main/http.c:341 {http_async_poll}: ### HTTP POST to URL=http://192.168.202.237:7071/api/Ruuvi/GW_VAASA: failed, err=28675 (ESP_ERR_HTTP_WRITE_DATA)
I (435268) LEDS: [adv_post_task/1] ### leds_indication_network_no_connection
I (435272) LEDS: [adv_post_task/1] LED: Start blinking, interval: 200 ms, duty cycle: 50%
I (435437) ruuvi_gateway: [main/1] free heap: 127556

Update: When set the filter on to only Ruuvi tags. The gateway seems to send payout correctly. However, the goal of the project is to collect data from hundreds (even thousand) of sensors around. Is that just out of Ruuvi gateway’s capacity?

From netcat, I could see the data payload was not always send as full. It got cut and left out. From the screenshot could observe that the old payload ended with only partial data, then new payload came.

Can anyone help?

Thank you for the report.

Ruuvi Gateway should support up to 100 sensors via HTTP POST, beyond that you need to use MQTT. This is because HTTP POST collects data into one packet and we run into limits in RAM if we try to collect huge amount of tags. MQTT sends data as it is received, but you need to implement filtering on the backend to keep the data volume reasonable.

@Alexey_Skvortsov2 please take a look, let’s check if we could fix this for 1.13.0

Thanks Otso again for your quick reply! I suppose we need to shift to MQTT for larger amount of sensors then.