omkar-foss commented on issue #41148:
URL: https://github.com/apache/airflow/issues/41148#issuecomment-2270491305

   >I tried to delete a DAG with many runs (14000+). After about 4 minutes I 
receive "xxx.yyy.airflow.amazonaws.com didn’t send any data. 
ERR_EMPTY_RESPONSE", and the DAG is not deleted.
   
   @GergelyKalmar the `ERR_EMPTY_RESPONSE` suggests that the connection is 
closed before the DAG deletion completed, particularly because the  of 14k+ 
runs deletion operation [in this 
function](https://github.com/apache/airflow/blob/main/airflow/api/common/delete_dag.py#L42-L108)
 is taking too long. This is a bug as @eladkal pointed out, and when this bug 
gets fixed here in upstream Airflow, it may be a while before it reflects in 
downstream MWAA which you're using.
   
   Meanwhile, I'd suggest you try to delete the DAG via the Airflow REST API 
with an increased request timeout. I've written a small script for this ([Gist 
here](https://gist.github.com/omkar-foss/51fe2e79a8da628833412652e69f32d1)) by 
referring to the MWAA docs, please check it out. You can tweak the script as 
per your need and increase the timeout beyond 10 mins if the deletion takes 
longer and fails. Hope this helps.
   


-- 
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]

Reply via email to