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

"_write_to_self" Resource temporarily unavailable #143

Open
mdavidsaver opened this issue May 30, 2024 · 1 comment
Open

"_write_to_self" Resource temporarily unavailable #143

mdavidsaver opened this issue May 30, 2024 · 1 comment

Comments

@mdavidsaver
Copy link
Member

With py3.11 using P4P with asyncio. Connecting to a large number of channels too longer than I expected. Turning on asyncio debugging shows many repetitions of:

DEBUG:asyncio:Fail to write a null byte into the self-pipe socket
Traceback (most recent call last):
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 139, in _write_to_self
    csock.send(b'\0')
BlockingIOError: [Errno 11] Resource temporarily unavailable

@coretl Does this look familiar? I recall your mentioning seeing a scalability issue with asyncio call_soon_threadsafe().

@coretl
Copy link
Collaborator

coretl commented Jun 3, 2024

I haven't seen this before, but I do recall performance issues when doing large numbers of call_soon_threadsafe(). My strategy was to copy the wakeup code from cothread and adapt for asyncio.

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

2 participants