question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MicroWebSrv2Exception: Not enough memory to allocate slots.

See original GitHub issue

Error messages is as below: “not enough memory” . I have used MicroWebSrv version 1. It never has this problem, Could you tell me how to avoid not engough memeory problem? thanks

and the second issue: MicroWebSrv can not coexist with mqtt


from MicroWebSrv2 import *

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

mws = MicroWebSrv2() mws.StartManaged() MWS2-INFO> Stops the managed pool. Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “MicroWebSrv2/microWebSrv2.py”, line 221, in StartManaged File “MicroWebSrv2/microWebSrv2.py”, line 213, in StartManaged File “MicroWebSrv2/microWebSrv2.py”, line 184, in StartInPool MicroWebSrv2Exception: Not enough memory to allocate slots.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
kenjicancommented, Nov 23, 2019

Change the parameter : wms._slotsCount = 4 .and then it works great~~ Thanks ~

another question: slotCount meas how many sockets opened concurrently?

2reactions
jcziccommented, Nov 23, 2019

Yes it’s for concurrents web requests and websockets too (websockets come from a request). slotCount = preallocated buffers to works on TCP connections.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MicroWebSrv2, new asynchronous Web server for ...
... MicroWebSrv2Exception: Not enough memory to allocate slots. ... only by smaller chunks due to low available memory in the MPY board, ...
Read more >
Python start pool - ProgramCreek.com
_slotsCount, slotsSize = self._slotsSize, keepAlloc = self._keepAlloc ) except : raise MicroWebSrv2Exception('Not enough memory to allocate slots.
Read more >
ESP32使用MicroPython和MicroWebSrv2搭建网站 - CSDN博客
MicroWebSrv2Exception : Cannot load module "PyhtmlTemplate". ... MicroWebSrv2Exception: Not enough memory to allocate slots.
Read more >
ESP32使用MicroPython和MicroWebSrv2搭建网站
... 连接WiFi的代码,简化不必要的代码、不引入不用的库,最后实在不行就多点按键reset几次会出奇迹。 MicroWebSrv2Exception: Not enough memory to allocate slots.
Read more >
使用MicroPython和MicroWebSrv2库在ESP32上搭建网站
MicroWebSrv2Exception : Not enough memory to allocate slots. 1. 6.访问. ​ 使用路由器管理查看ESP32的IP地址了,在同 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found