Repository navigation
morca ui: per-client limits, a cap on data reads at once, and the time in the log - #545
Merged
Merged
Conversation
…e in the log Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crawlers on prod (census 1.14.0) still ask for many data views and data.csv downloads at once. Each one is a
morca_maintain dataprocess of 1–11 s that a worker thread waits on, so cheap pages like /runs/ queued behind them and took 2–7 s.src/morca/_internal/web/limit.mojo):MORCA_UI_DATA_READSdata reads (Data tab, data.csv, data.json) run at once, by default half the workers. A client may have one running. Past that the answer is 503 withRetry-After: 5, so the other threads stay free.MORCA_UI_RATErequests a minute (off unless set), keyed byclient()(X-Forwarded-For behind the tunnel). Past it the answer is 429 withRetry-After. Requests with a session cookie or Authorization header, plus /healthz, the stylesheet, robots.txt and the worker API, aren't counted.morca ui: 2026-11-18T14:02:03Z GET ....MORCA_UI_WORKERS=8(threads that are waiting cost little) andMORCA_UI_RATE=120. The deploy tools go to 0.36.0.Tests: tests/test_limit.mojo (data-read URLs, the minute, the cap, pruning). tests/ui_drain.sh adds a 429 case and checks the timestamped log line. test-ui, test-ui-login, test-ui-drain, test-limit and test-hetzner pass locally (ouromo).
🤖 Generated with Claude Code
https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6