Stage 12 runs exhaust the database session pooler's 15-client limit
Maintainer thường phản hồi trong vòng 1 ngà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
- 25/100
Hướng nghiên cứu
Start at create_stage12_engine, which sets SQLAlchemy's QueuePool with pool_size=5 and max_overflow=5, and at runtime_store(), which builds a new engine per coordinator and worker call. Pull request #789 is already open against this work, so read it and its diff before starting anything. Done means a connection is held only for each short operation, refused connections are retried with bounded backoff, and a failed failure-record write no longer replaces the original error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Stage 12 coordinators and workers run out of database sessions. From 6 to 13 October 2026, 106 of the 153 production Stage 12 failures recorded:
FATAL: (EMAXCONNSESSION) max clients reached in session mode - max clients are limited to pool_size: 15
These were 100 US nationwide, 5 UK nationwide and 1 US state report. In 66 of them the coordinator failed at its initial claim, before any simulation started.
When the database is full, the failure handler's own write can also fail. The original error is then lost, and the comparison or simulation record stays running.
Cause
create_stage12_engineused SQLAlchemy's defaultQueuePoolwithpool_size=5andmax_overflow=5.runtime_store()builds a new engine for every coordinator and worker invocation.- A connection returned to
QueuePoolkeeps its physical session open. Each process therefore holds a pooler session while it calculates or waits, for up to 50 minutes. pool_recycle=300doesn't help, because recycling is only checked when a connection is checked out.- The coordinator and both country workers each allow 10 containers. Up to 30 processes can therefore each hold a session against a limit of 15.
Expected
- A database session is held only for each short operation.
- A connection refused before any statement is sent is retried, with a bounded backoff.
- A failure to write the failure record never replaces the original error.
Follow-ups (not in scope)
- Mark comparison and simulation rows that stay
runningpast the coordinator's 4,500 s timeout as failed. This needs a scheduled function. It would readSTAGE12_DATABASE_URL, which comes from Google Secret Manager and reaches Modal through thestage12-evaluation-runtimesecret. No workflow currently runs.github/scripts/stage12-sync-modal-secrets.sh, so how that Modal secret is populated is unconfirmed. - Consider the transaction-mode pooler if concurrent database operations still approach 15 after this change.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 1
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 51
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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 PolicyEngine/policyengine-sim-api
-
Update policyengine to 6.7.3Có thể đã có người làm @policyengine đã nhận hôm nay. Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 70/100
PolicyEngine/policyengine-sim-api#823 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Integration tests fail due to missing UV virtual environment setupCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
PolicyEngine/policyengine-sim-api#314 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
PolicyEngine/policyengine-sim-api#814 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Register weighted-microdata rules: weights aren't valuesCó thể đã có người làm @anth-volk đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
PolicyEngine/policyengine-sim-api#806 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
PolicyEngine/policyengine-sim-api#805 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PolicyEngine/policyengine-sim-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
[Bug] to_ical lexicographical/default sorting moves URL property between two X-WR- propertiesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
collective/icalendar#1968 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Deferred from #1869: Complete the companion pytest guardrail update noted in the PR description...Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Custom provider API keys collide on one host: env slot keyed on host:port only, not URL pathĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#140958 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug triage/confirmed
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 85/100
agentscope-ai/agentscope#3355 ·
Maintainer thường phản hồi trong vòng 2 ngày