Replies: 2 comments 5 replies
-
I have discovered micropython.mem_info() which is more detailed than gc.mem_free():
After the usual 7 request() calls:
I'm not familiar with the micropython memory management, but as far as i understand the "total" value should automatically expand with new splits from real total memory (8MB). This works with something like |
Beta Was this translation helpful? Give feedback.
-
You'll need to .close the response object returned to free the associated socket and it's memory |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After a few test requests from REPL i get this error:
This error is reproducible and happens after about 7-9 requests.
Sometimes the following memory allocation error is printed:
After doing gc.collect() the request works again. But still only about 7 times.
This is strange because micropython is running on ESP32 with 8MB PSRAM:
(sysname='esp32', nodename='esp32', release='1.22.2', version='v1.22.2 on 2024-02-22', machine='Generic ESP32S3 module with Octal-SPIRAM with ESP32S3')
The reported free mem does not vary much and the memory is far away from being exhausted.
This memory allocation error is reported anyway and it works again after gc.collect().
Here you can see with mem_free() values:
Did i do something wrong or is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions