This repository was archived by the owner on Apr 4, 2026. It is now read-only.
fix: stop Flask API request FD growth under Docker load#19
Merged
Conversation
Run API handlers through explicit sync dispatch and support both sync/async auth decorators so Flask no longer accumulates eventpoll/socket descriptors per request under Docker load. Made-with: Cursor
Nafania
added a commit
that referenced
this pull request
Mar 31, 2026
- #3: duplicate response loop breaker (breaks after 3 identical responses) - #4: dynamic output truncation threshold based on context window size - #2: resolve §§secret() / $$secret() placeholders in MCP server env/args/url/headers - #19: scheduler update_task tool method + prompt documentation Already applied (verified, skipping): #22 parallel MCP init, agent0ai#62 context window optimization Upstream: PR agent0ai#1265, PR agent0ai#857, PR agent0ai#1150, PR agent0ai#1105 Made-with: Cursor
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
asyncio.run) instead of Flask's implicit async bridge for registered API endpoints.Test plan
gpt-4o-minifor all models./healthbefore fix (FD grows and does not settle).200x /healthkeeps FD flat (delta 0, then -1 after settle)./poll+/history_getburst after fix: FD delta 0./messageworkload after fix: no monotonic growth on repeated rounds (warmup spikes settle; end delta near baseline).pytest -q tests/api/test_http_auth_csrf.pyin local host env (fails here due missinguvicorndependency in host Python env).Made with Cursor