US production: /us/metadata returns 500 and state-region simulations fail with connection reset at the simulation gateway
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, python, sqlalchemy
- Lĩnh vực
- api, backend, cloud, observability
Hướng nghiên cứu
Bắt đầu với các production logs cho GET /us/metadata và đường dẫn API → gateway → Modal executor, đặc biệt là policyengine-simulation-py4-20-3, rồi so sánh chúng với endpoint UK đang hoạt động tốt. Truy vết lý do các request vẫn ở trạng thái đang tính toán hoặc trả về connection reset sau migration của persistence và các thay đổi đối với Cloud Run. Công việc được xem là hoàn tất khi metadata US trả về 200, các lần chạy state-region hoàn tất, các lần chạy cấp quốc gia kết thúc bình thường và monitoring thực hiện probe các đường dẫn này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The US v1 production stack is partially down, and monitoring can't see it because Better Stack only probes the API root (which returns 200):
GET /us/metadatareturns HTTP 500 — observed on 2026-08-06, 2026-08-15, and 2026-08-21 (every check)./uk/metadataand/return 200. The app's US parameter pages depend on this endpoint.- US state-region society-wide simulations fail —
GET /us/economy/{policy}/over/2?region=state/or&time_period=2027returns{"status": "error", "message": "[Errno 104] Connection reset by peer", "result": null}, consistently on retry. Previously cached state results now error too (the cached result is gone and the recompute fails). - National runs hang —
region=usrequests sit in"computing"for 10+ minutes (normal completion is a few minutes).
As of 2026-08-21 18:00 UTC, every executor app in the Modal main environment (policyengine-simulation-py4-18-*, py4-20-3, py4-22-0) and policyengine-simulation-gateway show deployed with 0 running tasks while the API reports runs computing — requests are not starting on Modal. The reset-by-peer surfaces at the API → gateway → executor hop for the route production uses (resolved_app_name: policyengine-simulation-py4-20-3 on completed runs from before the failure).
Timeline (all observations read-only, from outside)
- 2026-07-17: state runs healthy (e.g. policy 98001
state/or2027 → −$25.2M, stamped pe-us 1.764.6 /populace-us-2024-buildi-sparse…/policyengine-simulation-py4-20-3). - 2026-08-06:
/us/metadata500; state runs still complete with the identical stamp. - 2026-08-15:
/us/metadata500; state runs still complete. - 2026-08-21:
/us/metadata500; state runs fail with connection reset; national hangs.
Better Stack logged only two brief auto-resolved root incidents (8/7 09:14–09:19, 8/14 04:47–04:52) in the same window.
Repro
curl -s -o /dev/null -w "%{http_code}\n" https://api.policyengine.org/us/metadata # 500
curl -s -o /dev/null -w "%{http_code}\n" https://api.policyengine.org/uk/metadata # 200
curl -s "https://api.policyengine.org/us/economy/98001/over/2?region=state/or&time_period=2027"
# {"status": "error", "message": "[Errno 104] Connection reset by peer", "result": null}
Possibly related
- The metadata failure window starts after the v1 persistence migration to SQLAlchemy/Alembic (#3788, 8/12) and Cloud Run revision changes in sim-api (#657, 7/28) — correlation only; I have not looked at logs.
- #2430 (simulation-API 500s surface as
status: ok+result: null) describes the adjacent failure mode; this one at least surfaces asstatus: error. - Suggest adding
/us/metadataand a state-region simulation smoke to Better Stack — the root probe can't catch either.
User-facing impact: every state-level analysis on policyengine.org (US) currently fails; external partners sharing state reform links hit errors.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 33
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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-api
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
PolicyEngine/policyengine-api#3865 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
PolicyEngine/policyengine-api#3864 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Replace rich SPM provenance with compact typed receiptsCó thể đã có người làm @anth-volk đã nhận 4 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
PolicyEngine/policyengine-api#3862 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
PolicyEngine/policyengine-api#3860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
PolicyEngine/policyengine-api#3823 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PolicyEngine/policyengine-api
Issue tương tự
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
debpalash/VoiceStudio#2624 ·
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 75/100
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 72/100
-
Make Catch2 optional when `RDK_BUILD_CPP_TESTS=OFF`Có thể đã có người làm @pechersky đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
There are a few redundant calls to `fdesc._setCloseOnExec()`Có thể đã có người làm @gudnimg đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày