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

"Not Enough Memory" at startup on Raspberry-Pi Pico #83

Open
mchobby opened this issue Jul 26, 2022 · 4 comments
Open

"Not Enough Memory" at startup on Raspberry-Pi Pico #83

mchobby opened this issue Jul 26, 2022 · 4 comments

Comments

@mchobby
Copy link

mchobby commented Jul 26, 2022

Hi,
Just for your information.
I did install MWS2 on a Raspberry-Pi Pico and getting Memory issue when starting the main.py example.
This error is always happening almost every time (the other time, it starts).
I will have a look to the previous version.

Additional information:

  • I'm running last nightly build of MicroPython (currently 1.19.1 205)
  • Free Mem @ startup : 153296 bytes
  • Free Mem after error : 52544 bytes
  • Running gc.collect() hangs everything

Here the error:

>>> import main_test

       ---------------------------
       - Python pkg MicroWebSrv2 -
       -      version 2.0.6      -
       -     by JC`zic & HC2     -
       ---------------------------

 + [@WebRoute] GET /test-redir
 + [@WebRoute] GET /test-post (TestPost1/2)
 + [@WebRoute] POST /test-post (TestPost2/2)

MWS2-INFO> Server listening on 0.0.0.0:80.
MWS2-INFO> Starts the managed pool to wait for I/O events.
MWS2-INFO> Server 0.0.0.0:80 closed.
MWS2-INFO> Stops the managed pool.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "main_test.py", line 170, in <module>
  File "/lib/MicroWebSrv2/microWebSrv2.py", line 223, in StartManaged
  File "/lib/MicroWebSrv2/microWebSrv2.py", line 220, in StartManaged
MicroWebSrv2Exception: Not enough memory to start 1 parallel processes.
@mchobby
Copy link
Author

mchobby commented Jul 26, 2022

Just work pretty well with the MWS version 1 available at
https://github.com/jczic/MicroWebSrv

@krishnak
Copy link

Build it as a module in your own micropython firmware then only it may work

@BetterAutomations
Copy link

In my experience, uPy is a memory hog. I've had to either compile frozen modules (include in custom firmware) or use the mpy-cross tool to make .mpy files.
https://forum.micropython.org/viewtopic.php?t=4510

@jczic
Copy link
Owner

jczic commented Sep 10, 2022

@BetterAutomations 👍🏻
That's right.

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

No branches or pull requests

4 participants