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

Support specify timeout for Milvus() #539

Closed
yhmo opened this issue Jun 3, 2021 · 4 comments
Closed

Support specify timeout for Milvus() #539

yhmo opened this issue Jun 3, 2021 · 4 comments
Assignees

Comments

@yhmo
Copy link
Contributor

yhmo commented Jun 3, 2021

Describe the bug
The Milvus() will wait for 90 seconds if milvus server is not running. The Milvus() call to ping(), the ping() has a parameter "timeout=30", and the GrpcHandler has a member "max_retry", its default value is 3. After 90 seconds, the Milvus() will raise an exception "Fail connecting to server on xxx. Timeout"
This behavior is not friendly to users. Maybe the Milvus() should provide a "timeout" parameter.

Expected behavior
Set timeout for Milvus() so we can write code like this:

try:
    milvus = Milvus(host=SERVER_ADDR, port=SERVER_PORT, timeout=3)
except:
    LOGGER.error("Connect server {} failed.".format(SERVER_ADDR))
    raise

Comment
This issue makes users hard to apply pymilvus in production.

@yhmo yhmo added the feature label Jun 3, 2021
@yhmo yhmo changed the title [BUG] Support specify timeout for Milvus() Jun 3, 2021
@anitas49
Copy link

anitas49 commented Jun 3, 2021

just curious, if this can be included in version 1.1.x pymilvus? thanks!

@XuanYang-cn
Copy link
Contributor

/assign @XuanYang-cn

@XuanYang-cn
Copy link
Contributor

just curious, if this can be included in version 1.1.x pymilvus? thanks!

@anitas49 Yes, will be in pymilvus v1.1.2

@XuanYang-cn
Copy link
Contributor

pymilvus v1.1.2 released

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

3 participants