clip_server lost connection after running for a while

Author: learningproCreated Oct 28, 2022Updated Aug 19, 2024

It can start normally, but after running for a while, it lost connections.

bash
DEBUG  clip_t/rep-0@6022 start listening on 0.0.0.0:54630
DEBUG  clip_t/rep-0@6019 ready and listening                                          [10/28/22 23:32:24]
──────────────────────────────────────  Flow is ready to serve! ───────────────────────────────────────
╭──────────────  Endpoint ───────────────╮
│  ⛓      Protocol                   GRPC  │
│          Local          0.0.0.0:51000  │
│        Private    192.168.31.58:51000  │
╰──────────────────────────────────────────╯
DEBUG  Flow@6019 2 Deployments (i.e. 2 Pods) are running in this Flow                 [10/28/22 23:32:24]
DEBUG  clip_t/rep-0@6022 got an endpoint discovery request                                                                                [10/28/22 23:37:35]
DEBUG  clip_t/rep-0@6022 recv DataRequest at /rank with id: 644c5f98f0034283bf9334718ec4295c
UserWarning: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at  /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:178.) (raised from /opt/homebrew/lib/python3.9/site-packages/torchvision/transforms/functional.py:150)
DEBUG  gateway/rep-0/GatewayRuntime@6023 GRPC call failed with code StatusCode.UNAVAILABLE, retry attempt 1/3. Trying next replica, if    [10/28/22 23:37:35]
       available.
DEBUG  gateway/rep-0/GatewayRuntime@6023 GRPC call failed with code StatusCode.UNAVAILABLE, retry attempt 2/3. Trying next replica, if
       available.
DEBUG  gateway/rep-0/GatewayRuntime@6023 GRPC call failed with code StatusCode.UNAVAILABLE, retry attempt 3/3. Trying next replica, if
       available.
DEBUG  gateway/rep-0/GatewayRuntime@6023 GRPC call failed, retries exhausted
DEBUG  gateway/rep-0/GatewayRuntime@6023 resetting connection to 0.0.0.0:54630
ERROR  gateway/rep-0/GatewayRuntime@6023 Error while getting responses from deployments: failed to connect to all addresses; last error:
       UNKNOWN: Failed to connect to remote host: Connection refused |Gateway: Communication error with deployment clip_t at address(es)
       {'0.0.0.0:54630'}. Head or worker(s) may be down.
bash
pip3 show clip_server
Name: clip-server
Version: 0.8.0
Summary: Embed images and sentences into fixed-length vectors via CLIP
Home-page: https://github.com/jina-ai/clip-as-service
Author: Jina AI
Author-email: [email protected]
License: Apache 2.0
Location: /opt/homebrew/lib/python3.9/site-packages
Requires: ftfy, jina, open-clip-torch, prometheus-client, regex, torch, torchvision
Required-by:

host on : Macbook Pro M1