Closed mrezzaaa closed 1 year ago
That is your application that based on your code which you should manage the memory usage from available memory yourself. Most of memory used by the library is dynamic allocation which taken by mbedTLS library approx 70k per server openning session which reducing much free heap.
The stack memory in ESP32 core is limited to 4 kB.
So, you suggest to increasing ESP32 core stack memory ?
I did not see the original error message that shows the error detail that related to stack or heap.
The minimum free heap for mbedTLS to work is 100k.
The FirebaseData object creates the instance of TCP client that utilized the mbedTLS for SSL/TLS data encryption/decryption.
Then when you use it for stream, which the connection must be kept open, the heap memory used by this all the time is approx. 70k
And if this object used for other tasks to update and read the database which the connection will keep open by default to reduce the time for SSL/TLS handshake every time, the memory will use all the time approx. 70k.
For the stack limit changing, by hard code changing the file in core SDK which you can search google for how to do it.
How do you think what if i connect firebase with xTaskCreatePinnedToCore
to maintain connection still open ?
It's not related to the session (http connection).
The http connection is normally closed by server after returning the response and can be kept open by client by sending the "Connection: keep-alive" header with the request.
Describe the bug
Hi, i just creating a program using WiFi and BLE for esp32 to listen rtdb and sending command via BLE(listener) to nearby devices(node/command executor) when value on rtdb changed.
First handling stream callback run smoothly. After handling some stream callback function the devices (listener) rebooted.
To Reproduce Steps to reproduce the behavior: I had decode stack trace exception via EspExceptionDecoder tools and here what i got
140KB from 254KB
93KB from 254KB
93KB from 254KB
IDE and its version:
core:6.1.4
andhome:3.4.3
ESP32 Arduino Core SDK version
Another libraries
Additional context Question : is streamcallback cannot be interrupted with some
delay()
function ? because when my listener handling stream data from rtdb, it will scan to nearby device about 5 seconds (time blocking) and sending command to nearby node (about 30-100 devices nearby) and trying to filtering each devices. Why i asking this because NimBLE connect and retrieve some BLE attributes, it take some seconds.