OSError 23 #14148
Unanswered
dannybr
asked this question in
Core Development
OSError 23
#14148
Replies: 3 comments 3 replies
-
Hi |
Beta Was this translation helpful? Give feedback.
0 replies
-
On 21 Mar 2024, at 19:59, sophiedegran ***@***.***> wrote:
Hi
1- version of micropython ?
MicroPython-1.22.2-riscv-IDFv5.0.4-with-newlib4.1.0
2- board or unix/ windows ?
Board, tried on esp32 and esp32c3
3- did you open socket ?
Yes, 2
… ...
—
Reply to this email directly, view it on GitHub <#14148 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AETR46LN2R3HSJ2PU4QINITYZMNWXAVCNFSM6AAAAABFB3GJY6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQNRZGQ2DQ>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
The first issue is that the program never ends.
It binds to 2 sockets and waits for connection, and I’m using threads.
This works fine, the problem arises when I restart it, say after
some software change.
I assume that once it runs from the flash that won’t be a problem, but so far
Im avoiding that since every time I do that, it’s not easy to recover control (ie Thonny nor
Mpremote can stop it. And once it’s running from flash, it’s not easy to diagnose
the problem :-)
Q: in C, I can restart the program with esp_restart(), but I don’t see an equivalent
In micropython.
… On 21 Mar 2024, at 22:31, sophiedegran ***@***.***> wrote:
When you close your program did you close the socket ?
I mean by default micropython can open 5 sockets max ...
And a socket still open after a closed program... if you are in async mode you have to (example)
self server.close ()
await self.server.wait_closed ()
Hope that help it seem to be that
—
Reply to this email directly, view it on GitHub <#14148 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AETR46LOAAMYNDNTFAS4W2DYZM7RJAVCNFSM6AAAAABFB3GJY6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQNZQGY4TQ>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
OSError 23 is not listed in, i.e module errno list does not include it.
anyways, from Unix it means Too many open files.
it happens to me, after restarting my ap some 5 times, and so far the only way to fix this, is
calling machine.reset(), but that brings me back to REPL,
so Q: 1- how can I close all open fd 's at the begining of my app?
or how to make sure my app starts in a clean environment?
Beta Was this translation helpful? Give feedback.
All reactions