Dev-iL opened a new issue, #77502: URL: https://github.com/apache/airflow/issues/77502
Large JSON request bodies can stall the Execution API event loop while FastAPI validates the request and Cadwyn migrates it. A task-state store PUT is the measured case. Other versioned endpoints that accept large `JsonValue` inputs may share this cost. [Task-state conversion and benchmark](https://github.com/apache/airflow/pull/75381#event-loop-stall-measurements-from-an-earlier-revision) In the two PostgreSQL rounds for a 688,890-byte array, median loop stalls were 90 and 86 ms with the synchronous route and 133 and 121 ms with the async route. The measurements used Python 3.14.8 and SQLAlchemy 2.0.54 in Breeze. The loop-thread profile showed repeated Pydantic `JsonValue` validation and a Cadwyn model dump. Moving the handler’s `json.dumps` to a worker did not restore the baseline. The extra yields on the synchronous path are a possible explanation for the difference in stall duration. [Performance follow-up from the review](https://github.com/apache/airflow/pull/75381#discussion_r4668219249) To reproduce, PUT a JSON array of 100,000 integers to `/execution/store/ti/{task_instance_id}/{key}` for a valid task instance. Use the same dependencies, database and payload for both revisions. Check the response and stored value, then record the longest server-loop ticker interval for each warm request alongside request duration. Profile the request-body path and repeat on a second endpoint with a large JSON body to find out which routes share the bottleneck. The goal is to reduce event-loop stalls while preserving request validation and versioned API behavior. The state-store model optimization is already proposed in [#77113](https://github.com/apache/airflow/pull/77113). This issue tracks the shared request-body cost and the scope beyond those models. --- Drafted-by: Codex (GPT-6) (no human review before posting) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
