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

fix timeout to impove stability #7443

Merged
merged 1 commit into from
Mar 23, 2025

Conversation

SugiKent
Copy link
Contributor

  • This change is worth documenting
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality that this introduces.
Extended the timeout period for plugin initialization to prevent setup failures in environments that require more processing time.


Give a summary of what the PR does, explaining any non-trivial design decisions.

This PR extends the timeout period for plugin initialization from 30 seconds to 60 seconds. Testing in real environments revealed that the 30-second timeout was insufficient in some cases, causing initialization failures.

The error message displayed when a timeout occurs.

ERROR: Traceback (most recent call last):
File "/openhands/poetry/openhands-ai-5O4_aCHf-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 693, in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openhands/micromamba/envs/openhands/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/openhands/code/openhands/runtime/action_execution_server.py", line 553, in lifespan
await client.ainit()
File "/openhands/code/openhands/runtime/action_execution_server.py", line 239, in ainit
await wait_all(
File "/openhands/code/openhands/utils/async_utils.py", line 77, in wait_all
raise asyncio.TimeoutError()
TimeoutError

Link of any specific issues this addresses.

Copy link
Collaborator

@tofarr tofarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you have some (custom?) plugins that take longer than 30 seconds to load.

This shouldn't hurt other folks use cases.

@SugiKent
Copy link
Contributor Author

@tofarr thank you.
I did not use any custom plugins. Actually I used a RaspberryPi 4 that had 8 GB memory, I thought it is one of the causes.

@rbren
Copy link
Collaborator

rbren commented Mar 23, 2025

Yeah this is the problem with timeouts. They create nondeterministic behavior.

Seems worth merging this as-is, but we need to figure out a better way to know when the install is done

@rbren rbren merged commit daa4af1 into All-Hands-AI:main Mar 23, 2025
14 checks passed
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

Successfully merging this pull request may close these issues.

3 participants