[Feature Request] Expose SDK metric for `worker._count_not_evict_count`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- backend, observability
Hướng nghiên cứu
Tìm worker._count_not_evict_count trong phần triển khai worker bằng Python và theo dõi cách vòng lặp eviction hiện có cập nhật nó. Hiển thị trạng thái đó dưới dạng một metric của SDK, sau đó xác minh rằng metric phản ánh các worker bị mắc kẹt khi đang thử lại eviction và có sẵn để giám sát.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
We have found that periodically (for reasons that we still need to root cause) our workers run into a series of Failed running eviction job for run ID 0196d798-a08b-7a00-9082-353865f449b4, continually retrying eviction. Since eviction could not be processed, this worker may not complete and the slot may remain forever used unless it eventually completes. errors. Then hours later when the pod containing the worker is terminated, we see this log: Shutting down workflow worker, but 46 workflow(s) could not be evicted previously, so the shutdown may hang. For this particular worker, we run 50 concurrent workflows, which if I interpret things correct means that for several hours the worker was in an infinite loop trying to allow 46 workflows to evict and only able to process 4 workflow tasks at a time.
We would like to be able to detect and alert on these situations more proactively. Usually we end up finding out about them because the worker set scales up to the maximum number of replicas for an extended period of time.
Describe the solution you'd like
Since the code already keeps track of when it is in its own infinite loop trying to process the eviction, I think it would be useful to expose that information as a metric so that alerting tools can be used to alert when pods have been in that state for whatever the team monitoring the metric determines to be "too long".
Additional context
If the team is bold enough, it could also be nice to do one or more of the following:
- Provide a setting that forces the worker to shutdown if it has been in an eviction loop for too long.
- Provide more threads than
max_concurrent_workflow_tasksso that the ability to process workflows isn't as likely to be impeded by the infinite eviction loop.
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 241
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 49
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temporalio/sdk-python
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
temporalio/sdk-python#1517 · 10 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
temporalio/sdk-python#496 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
temporalio/sdk-python#1890 ·
-
[Bug] Local activity resolutions regrouped on replay since 1.32.0, delivering the wrong payload Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
temporalio/sdk-python#1881 · 1 bình luận ·
-
bug
temporalio/sdk-python#1817 · 1 bình luận · 1 người được giao ·
Tất cả issue của temporalio/sdk-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100