Closed denysmomo closed 4 years ago
The stream data (JSON in this case) will be stored in memory. As the size of JSON go bigger, your free heap will be reduced. If the free heap is running out, the problem will occur.
Handling of the large JSON stream data must be avoided because you are working with embedded device that its memory was limited.
You have only 161 k bytes before start the SSL connection which it may use approx. 100 k for SSL connection and only 60k bytes remains for use as stack and heap.
The reserved stack for the internal rtos task used in this library is 10000 bytes, which results in lower stack and heap available below 5000 bytes.
You should reduce the size of live data (stream) and keep it small as possible. It should be the sensor status or something that use only the number or boolean for storing.
Try to rename the node name to be shorter to reduce the size of JSON.
The long node name (key) like this "999evjBX99r2vHsIy3rewermdvAQVWhlkdBmtZSFZ0IeW" is useless and wasted your useful memory.
hi, i want access to my real time database for read some childpath. when call back for the first time
stream
print json like 5.5kb print correctlySerial.println("path: " + stream.dataPath + ", type: " + stream.type + ", value: " + stream.value);
if json have data like 7kb
and aftrer
if json have data like 8-12kb
if json have data like over 18kb the first call back not work on poweron
not print json but work!
the problem is when i start new database and add some data in future i have a problem when esp32 poweron and my data have lengh from 6kb to 18kb :(
my code
can someone help me? Thanks
PS. for now the solution is keep some casual data (minimum 20kb) on some child node