Unable to close grpc_channel. Connection was interrupted on the server side
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 304
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 37
Description
I set up a Qdrant Vector DB in a Docker container and created a Python script to query the Vector DB using QdrantClient. However, after executing all queries, when the QdrantClient attempts to close the connection, it throws an error stating, "Unable to close grpc_channel. Connection was interrupted on the server side."
Current Behavior
The error message from QdrantClient:
[2024-01-30 12:27:28,956-WARNING: close:163] Unable to close grpc_channel. Connection was interrupted on the server side
Exception ignored in: <function QdrantClient.__del__ at 0x7fea068b9ee0>
Traceback (most recent call last):
File "/lib/python3.9/site-packages/qdrant_client/qdrant_client.py", line 132, in __del__
File "/lib/python3.9/site-packages/qdrant_client/qdrant_client.py", line 139, in close
File "/lib/python3.9/site-packages/qdrant_client/qdrant_remote.py", line 163, in close
File "/lib/python3.9/logging/__init__.py", line 2082, in warning
File "/lib/python3.9/logging/__init__.py", line 1458, in warning
File "/lib/python3.9/logging/__init__.py", line 1589, in _log
File "/lib/python3.9/logging/__init__.py", line 1599, in handle
File "/lib/python3.9/site-packages/sentry_sdk/integrations/logging.py", line 102, in sentry_patched_callhandlers
TypeError: argument of type 'NoneType' is not iterable
Steps to Reproduce
- Config the vector DB using docker-compose
version: '3.9'
services:
vector-db:
image: qdrant/qdrant
volumes:
- ./data/qdrant_storage:/qdrant/storage:z
ports:
- 6333:6333
- 6334:6334
networks:
- my-net
networks:
my-net:
- Initialize
QdrantClientin a custom Python class's__init__method to execute queries in other methods:
class MyClass(ABC):
def __init__(self):
self.vector_db_client = QdrantClient("vector-db", prefer_grpc=True)
def my_func(self):
# Make queries to the Vector DB using `self.vector_db_client`
- Run the script and encounter the above error upon exiting.
Expected Behavior
The script should exit successfully without any errors.
Context (Environment)
- Qdrant Vector DB: v1.7.3
- qdrant-client: v1.7.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the shutdown behavior with the provided docker-compose setup, Qdrant v1.7.3, and qdrant-client v1.7.1. Start with qdrant_client.py lines 132-139 and qdrant_remote.py line 163, then trace the close path and its logging interaction. Done means the script exits without the grpc_channel warning or the ignored-exception traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, grpc, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100