We have a really large device twin (more than 2800 lines). After some point we consistently get a 500 status code when trying to send reported properties. From here Cloud-to-device communications guidance , I see that desired properties can have 8KB maximum size. But there is no word about reported properties. This document Reference - IoT Hub quotas and throttling says that a device-to-cloud message can be up to 256KB. So I assume we could still send our large reported properties. When I copy the plain text JSON message out of IoT hub's web interface and save it (with all whitespaces and all meta data), it has a size of 84KB.
Is there some other size limit on the reported properties? Is there a possibility to automatically split the device twin message into several messages (without doing a partial update)?
Remark: I know it's not optimal to have a large device twin but it needs to handle several actual device since we're using MQTT (because of device twin and direct methods) and because the IoT edge gateway is not an option for us right now.
have a look at the Device twin size
The 8KB size limitation is on the values of tags, desired and reported properties. Note, that the Property or Tag value should be maximum 512 bytes. In other words, 16 properties should be used for total limit 8kB values.