schreibfaul1 / ESP32-audioI2S

Play mp3 files from SD via I2S
GNU General Public License v3.0
1.15k stars 291 forks source link

SSL - Memory allocation failed #912

Open Father001 opened 4 days ago

Father001 commented 4 days ago

How to free up memory???

I'm using the code for this example: https://github.com/schreibfaul1/ESP32-audioI2S/blob/master/examples/separate_audiotask/separate_audiotask.ino

and I add one button, when button clicked, I called audio.stopSong();, and i need use http connect other url, but i get this error:

[288634][E][ssl_client.cpp:37] _handle_error(): [start_ssl_client():264]: (-32512) SSL - Memory allocation failed [288635][E][WiFiClientSecure.cpp:144] connect(): start_ssl_client: -32512

What is the function of audio.stopSong()? it no free up memory?

schreibfaul1 commented 3 days ago

The WiFiClientSecure releases the memory itself. Alternatively, you can move mbedTLS to the PSRAM if there is a lack of memory.

Father001 commented 3 days ago

The WiFiClientSecure releases the memory itself. Alternatively, you can move mbedTLS to the PSRAM if there is a lack of memory.

Thank you for the answer,!I solved the problem,