jina-ai / jina

☁️ Build multimodal AI applications with cloud-native stack
https://docs.jina.ai
Apache License 2.0
20.99k stars 2.22k forks source link

When the GRPC protocol is used to invoke the jina server, the synchronization request is always blocked. #5666

Closed crbean closed 1 year ago

crbean commented 1 year ago

Describe the bug

When the GRPC protocol is used to invoke the jina server, the synchronization request is always blocked.

Describe how you solve it

client.post('/', Document, parameters=XXX, results_in_order=True, continue_on_error=True,max_attempts=3)

Environment

Screenshots

crbean commented 1 year ago

There is no related record in the log. When you run the py_spy command to view the current stack, you can find that the thread is blocked.

Thread 33994 (idle) select (selectors.py:469) _run_once (asyncio/base_events.py:2381) run_forever (asyncio/base_events.py:857) run_until_complete (asyncio/base_events.py:634) run (asyncio/runners.py:300) run_async (jina/helper.py:1854) post (jina/clients/mixin.py:1041)

JoanFM commented 1 year ago

Hello, can you share ur Flow and code to reproduce?

crbean commented 1 year ago

f = Flow(port=JINA_PORT, host=JINA_IP, timeout_send=TIMEOUT_SEND).add(uses=XXX, replicas=int(2), host=JINA_IP)

JoanFM commented 1 year ago

what is your JINA_IP is it localhost?

Also, it is important to know what is the Executor doing.

What do you see when setting JINA_LOG_LEVEL=DEBUG?

crbean commented 1 year ago

JINA_IP is 127.0.0.1 how to know what is the Executor doing? Does the value of JUNA_LOG_LEVEL need to be set to debug?

JoanFM commented 1 year ago

sorry, Debug not True

JoanFM commented 1 year ago

Is thr Executor something you develop or u use one from the Hub?

wqh17101 commented 1 year ago

Yeah,we develop a executor like clip-as-service——using bert to inference which is the model trained by transformers. crbean and i use the same service.

JoanFM commented 1 year ago

one thing that is weird is that in the post it seems that you are passing a Document class and not a Document instance

JoanFM commented 1 year ago

I would need to see some logs to understand the problem. It is hard to take actions with the information provided

wqh17101 commented 1 year ago

@JoanFM

one thing that is weird is that in the post it seems that you are passing a Document class and not a Document instance

No,it is DocumentArray([Document(text=text) for text in data_list])

wqh17101 commented 1 year ago

I would need to see some logs to understand the problem. It is hard to take actions with the information provided

Trying to collect.

JoanFM commented 1 year ago

Hello @wqh17101 ,

is there any progress on this? have u been able to collect more information?

wqh17101 commented 1 year ago

@JoanFM No,just close it now, and i will open it if i need.

JoanFM commented 1 year ago

Will close it for the time being, do not hesitate to reopen an issue for any problem