You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 21, 2025. It is now read-only.
When there are no ready tasks, Curio waits until the next deadline. However, on non-Windows systems, there is no upper limit by default, so any sleep/timeout that is too large may cause an OverflowError/OSError to be raised in the kernel context.
importcurioasyncdefmain():
try:
awaitcurio.sleep(2_147_484) # for epollexceptBaseExceptionasexc:
print("EXCEPTION:", type(exc))
raiseif__name__=="__main__":
curio.run(main)
EXCEPTION: <class 'curio.errors.TaskCancelled'>
Traceback (most recent call last):
File "/home/user/workspace/test.py", line 13, in <module>
curio.run(main)
File "/home/user/.local/lib/python3.12/site-packages/curio/kernel.py", line 824, in run
return kernel.run(corofunc, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.12/site-packages/curio/kernel.py", line 146, in run
task = self._runner(coro)
^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.12/site-packages/curio/kernel.py", line 641, in kernel_run
events = selector_select(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OverflowError: timeout is too large
The quickest solution is to replace max_select_timeout=None with max_select_timeout=86400 (one day).