Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Socket context #393

Merged

Conversation

joerunde
Copy link
Collaborator

Ensures no sockets are leaked on the client-side

Also postpones the server shutdown await so that the backend can shutdown concurrently, and all connections can be cleaned up at the same time. This prevents hangs where the frontend blocks on remaining connections but the backend has not yet initiated shutdown

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which consists a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of default ones by unblocking the steps in your fast-check build on Buildkite UI.

Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge).

To run full CI, you can do one of these:

  • Comment /ready on the PR
  • Add ready label to the PR
  • Enable auto-merge.

🚀

async def _send_one_way_rpc_request(self, request: RPC_REQUEST_TYPE,
error_message: str):
"""Send one-way RPC request to trigger an action."""
@contextmanager
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this need to be asynccontextmanager?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so because it doesn't use any async methods or do any blocking

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on this I think it's just poll / send / recv that need to be handled with async:

https://pyzmq.readthedocs.io/en/latest/api/zmq.asyncio.html#socket

Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
@joerunde joerunde merged commit 0b351c0 into neuralmagic:isolate-oai-server-process Jul 31, 2024
1 check passed
@joerunde joerunde deleted the socket-context branch July 31, 2024 22:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants