Skip to content

Increase default CIRCUITPY_PYSTACK_SIZE to at least 2048 #10189

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

Closed
dhalbert opened this issue Mar 26, 2025 · 2 comments · Fixed by #10236
Closed

Increase default CIRCUITPY_PYSTACK_SIZE to at least 2048 #10189

dhalbert opened this issue Mar 26, 2025 · 2 comments · Fixed by #10236
Assignees
Milestone

Comments

@dhalbert
Copy link
Collaborator

dhalbert commented Mar 26, 2025

CIRCUITPY_PYSTACK_SIZE is currently 1536 for all boards except one specialized board. We have seen "pystack exhausted errors on PyPortal projects with this size, such as https://forums.adafruit.com/viewtopic.php?t=217498. I was able to get that NASA image project working by increasing PYSTACK to 2048. Other threads in the forums have increased it to 4k or greater, though they may have not tried to determine the minimum size.

Currently CIRCUITPY_PYSTACK_SIZE can be set in settings.toml, but it's something of a support burden help people with that.

How about increasing the default to at least 2048, except maybe on SAMD21? I think that would cover Portal projects that might be suffering otherwise.

I would plan to do this for 9.2.x

@dhalbert dhalbert added this to the 9.2.x milestone Mar 26, 2025
@tannewt
Copy link
Member

tannewt commented Mar 27, 2025

I'd rather change this in 10.x since it will reduce the heap size. (Plus I want us to focus on 10.x)

@dhalbert
Copy link
Collaborator Author

In that case I will add instructions to various PyPortal projects to increase the pystack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants