algolia / algolia/algoliasearch-client-python

feat: Edit the requests configuration pool_maxsize variable when initializing client

Đang mở
#521 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
207
Fork
63
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

- Algolia Client Version: 2.4.0
- Language Version: Python 3.9.1

### Description
I'm replicating a dataset (60k records) with 100 threads (Python's builtin _ThreadExecutor_) at a time. And I find that from time to time I keep getting these warnings from the 'requests' library: **"Connection pool is full, discarding connection: xxxxxxxx.algolia.net"**.

The ability to edit the _pool_maxsize_ configuration variable when initializing the search client would solve this kind of issues, perhaps even allowing to edit other _requests_ configurations.

### Steps To Reproduce
Initialize a ThreadExecutor of 100 max workers.
Create a function that uses 'save_object' to store a record in a predefined index.
Loop through thousands of records, for each record:
-Add the function that saves the record with the record data to the executor

You should get the warning every ~1000 records.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu từ đường dẫn khởi tạo search client và lần theo cách requests session hoặc connection pool của nó được cấu hình. Xác minh cách các lệnh gọi save_object đồng thời sử dụng cấu hình đó; hoàn tất khi bên gọi có thể thiết lập pool_maxsize lúc tạo client và bản tái hiện với 100 worker không còn phát ra cảnh báo pool đầy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api, backend
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.