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: allow to set worker count more than 1 #1984

Merged
merged 1 commit into from Jan 13, 2022

Conversation

Suresh-Nakkeran
Copy link
Contributor

@Suresh-Nakkeran Suresh-Nakkeran commented Jan 11, 2022

according to tornadoweb/tornado#2426 (comment), the async io initialization code should be done after the "fork".

fixes #1759

logging.info(f"Setting asyncio max_workers as {self.max_asyncio_workers}")
asyncio.get_event_loop().set_default_executor(
concurrent.futures.ThreadPoolExecutor(max_workers=self.max_asyncio_workers))
if self.workers == 1:
Copy link
Member

Choose a reason for hiding this comment

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

@Suresh-Nakkeran just saw this comment, can you try removing worker check and moving the asyncio initialization code after the "fork"(line131) see if multi-processing works .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right @yuzisun . multi-processing is working by moving initialization code after starting http server.
image

Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
@yuzisun
Copy link
Member

yuzisun commented Jan 13, 2022

/lgtm
/approve

@kserve-oss-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Suresh-Nakkeran, yuzisun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kserve-oss-bot kserve-oss-bot merged commit 343bae6 into kserve:master Jan 13, 2022
plankthom added a commit to waylayio/kfserving that referenced this pull request Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting workers more than 1
3 participants