uasyncio - queue overflow !

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
sebion
Posts: 5
Joined: Thu Oct 17, 2019 12:33 pm

uasyncio - queue overflow !

Post by sebion » Mon Jan 20, 2020 9:02 pm

Hi all,

I'm getting crazy and without any ideas left to solve my problem.
I've got async tasks based program and after a while it stops raising a "queue overflow" error.

I would like to know how I can debug this fu..... program, and I'd like to know if there is a way of listing all the running and waiting tasks ?
Maybe there's another way of doing things to debug such async program.

I thank you in advance for your help.

Best regards.

Sebion

User avatar
tve
Posts: 216
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

Re: uasyncio - queue overflow !

Post by tve » Mon Jan 20, 2020 9:29 pm

Have you considered:
- posting some select code snippets
- posting an error traceback
- setting DEBUG to true: https://github.com/micropython/micropyt ... core.py#L8

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: uasyncio - queue overflow !

Post by pythoncoder » Tue Jan 21, 2020 8:31 am

The queue sizes of uasyncio V2 are fixed and determined by the first call to get_event_loop(). Default sizes are 16. So you could try increasing these by ensuring that the following is executed at the start of your program:

Code: Select all

get_event_loop(runq_len=64, waitq_len=64)
If it still fails after a (longer) period it would suggest that your code is creating coroutines more frequently than they are terminating.

Aside from that, as @tve says, it's har for us to help without more concrete information.
Peter Hinch
Index to my micropython libraries.

sebion
Posts: 5
Joined: Thu Oct 17, 2019 12:33 pm

Re: uasyncio - queue overflow !

Post by sebion » Tue Jan 21, 2020 1:22 pm

Hi all,

Thank you very much for your help.
I'll try both of your suggestions.

As I'm not familiar to the "Logging" Library, once DEBUG is set up in the uasyncio, how dose it work?
Where will I be able to get back all the debug information ?

Thank you once again for your help.

Sebion

Post Reply