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

It doesn't work in notebook #4

Open
shiyu22 opened this issue May 11, 2022 · 9 comments
Open

It doesn't work in notebook #4

shiyu22 opened this issue May 11, 2022 · 9 comments

Comments

@shiyu22
Copy link

shiyu22 commented May 11, 2022

It works when I run this code with python command:

import milvus
milvus.start()
from pymilvus import connections, FieldSchema, CollectionSchema, DataType, Collection, utility
connections.connect(host='127.0.0.1', port='19530')
Collection('hello_milvus').num_entities

But when I run it in notebook will get error:
截屏2022-05-11 19 43 56
It seems that milvus is not started, but in cell 1 milvus.start has passed, strangely not printing "---Milvus Proxy successfully initialized and ready to serve!---".

And it's like milvus.start is asynchronous in the notebook, cell 2 will work after minutes.

@shiyu22 shiyu22 changed the title Milvus Proxy is not ready after run milvus.start successfully in notebook It doesn't work in notebook May 12, 2022
@soothing-rain
Copy link
Collaborator

Can you post the server logs here? (usually at /tmp/e-milvus/logs)

@shiyu22
Copy link
Author

shiyu22 commented May 13, 2022

Actually, I have no such directory with #2. Can you reproduce it?

@soothing-rain
Copy link
Collaborator

Actually, I have no such directory with #2. Can you reproduce it?

Could be an old version. Can you check /tmp/milvus instead?

@shiyu22
Copy link
Author

shiyu22 commented May 13, 2022

embedded-0.log
etcd.log

@soothing-rain
Copy link
Collaborator

From the log it looks like Milvus started successfully. Could be your version does not print that "---Milvus Proxy successfully initialized and ready to serve!---" line.

Try waiting a while (1-2 minutes) before trying to use it

@shiyu22
Copy link
Author

shiyu22 commented May 13, 2022

Actually, it sometimes prints "---Milvus Proxy initialized successfully, ready to serve!---". So if I want to run all cells at once, adding time.sleep to my notebook is the only way, which I think is confusing.

@soothing-rain
Copy link
Collaborator

Emmm, sometime it takes longer for Milvus to fully startup and print that line. If not, it usually indicate something is wrong during Milvus startup

@shiyu22
Copy link
Author

shiyu22 commented May 16, 2022

Emmm, sometime it takes longer for Milvus to fully startup and print that line. If not, it usually indicate something is wrong during Milvus startup

Is there any function that checks if the embedded milvus is started? I added time.sleep(30) to the notebook but it still shows the error, I think it hasn't started successfully yet.

@soulteary
Copy link
Contributor

#25 @shiyu22 Give it a try, it might be a good solution

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