Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory issues #1

Closed
psitem opened this issue Apr 5, 2024 · 0 comments · Fixed by #2
Closed

Out of memory issues #1

psitem opened this issue Apr 5, 2024 · 0 comments · Fixed by #2

Comments

@psitem
Copy link
Owner

psitem commented Apr 5, 2024

Added a couple more monitors to my largest Uptime Kuma instance and found my Pico W-based Pac Ghost stopped functioning with out-of-memory errors, despite free memory being > 3X the size of the /metrics response. Pointing my ESP32-C3 version to the same Uptime Kuma instance also ran into memory problems, somehow despite having ~1.5X the memory of the RP2040 it has marginally less memory free under CircuitPython.

I've opened an issue against the adafruit_requests library highlighting that the memory consumption of accessing request.text is quite bad.

adafruit/Adafruit_CircuitPython_Requests#183

I've been coming to the conclusion that using boards without PSRAM and extra flash is a bad trade-off. There are ESP32-S2FN4R2 boards on Amazon that get below the Pico W's MSRP in multiple quantities and for a couple bucks more there are lots of ESP32-S3 options. Seeing 8M bytes free on my $9 Arduino Nano clone is niiiiice.

psitem added a commit that referenced this issue Apr 5, 2024
Read the response buffer directly, one line at a time, instead of iterating on response.text.
@psitem psitem closed this as completed in #2 Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant