millin commented on issue #40082:
URL: https://github.com/apache/airflow/issues/40082#issuecomment-2253016337

   I did a research.
   This error is the result of multiple dag-processors simultaneously trying to 
insert a new `serialized dag` into the table.
   After some time, one of the dag-processors manages to do this and the error 
goes away.
   
   When processing dynamic DAGs (especially if there are several hundred of 
them in one dag-file) it just happens more often, because inserting new rows 
takes more time.
   
   In the case of MWAA the error occurs very often because when starting a new 
image (e.g. for new worker) each time the `airflow db migrate` [command is 
called](https://github.com/aws/amazon-mwaa-docker-images/blob/2c0bad6b29f8f856fe4c4938a7b6d99ab626f1ec/images/airflow/2.9.2/python/mwaa/entrypoint.py#L114)
 from `entrypoint`, which in turn runs `reserialize_dags` and clears the whole 
`serialized_dag` table.


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