You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/08 06:11:21 UTC

[GitHub] [airflow] alexmc-ms opened a new issue #14129: Sensors in up_for_reschedule state report "dependency Not In Retry Period" for many hours, sometimes permanently

alexmc-ms opened a new issue #14129:
URL: https://github.com/apache/airflow/issues/14129


   
   **Apache Airflow version**: 1.10.14. This behavior rarely occurred in 1.10.9. See below.
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): None
   
   **Environment**: Production
   
   - **Cloud provider or hardware configuration**: Azure
   - **OS** (e.g. from /etc/os-release): Linux
   - **Kernel** (e.g. `uname -a`): Debian9 with custom secure kernel
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   We run about 50k+ tasks per day in Airflow in production. Much of this is calling a REST API using the http_operator and then polling the response using a sensor. A GET return of 202 means the API is still busy. In the sensor, we set it to reschedule mode in order to give up the worker slot when we get a 202.
   
   We see this:
   [2021-02-05 00:25:15,538] {service_http_hook.py:42} INFO - Response code: 202 with reason: Accepted
   [2021-02-05 00:25:15,538] {service_http_hook.py:43} INFO - Response body: None
   [2021-02-05 00:25:15,566] {taskinstance.py:1141} INFO - Rescheduling task, marking task as UP_FOR_RESCHEDULE
   [2021-02-05 00:25:19,678] {local_task_job.py:102} INFO - Task exited with return code 0
   [2021-02-05 01:20:05,909] {taskinstance.py:662} INFO - Dependencies not met for <TaskInstance:Person_sensor 2021-02-04T08:00:00+00:00 [up_for_retry]>, dependency 'Not In Retry Period' FAILED: Task is not ready for retry yet but will be retried automatically. Current date is 2021-02-05T01:20:05.909178+00:00 and task will be retried at 2021-02-05T01:20:31.308865+00:00.
   
   --Logs removed here for brevity--
   
   [2021-02-05 09:58:27,687] {taskinstance.py:662} INFO - Dependencies not met for <TaskInstance: Person_sensor 2021-02-04T08:00:00+00:00 [up_for_retry]>, dependency 'Not In Retry Period' FAILED: Task is not ready for retry yet but will be retried automatically. Current date is 2021-02-05T09:58:27.687643+00:00 and task will be retried at 2021-02-05T09:58:52.511385+00:00.
   [2021-02-05 09:58:27,692] {local_task_job.py:90} INFO - Task is not able to be run
   
   **What you expected to happen**:
   I would expect Airflow to do what it apparently did before and run as many tasks as it can. If it needs to starve some tasks, that's fine, but what does it even mean to not be in the retry period?
   
   We have 48 worker slots (and for business reasons are currently capped at that). We are scheduling 50k+ tasks over the course of a day and the poke_interval has been 120 seconds. We know this is flooding the system with more than it can handle, but again, why does it give this strange error rather than just starve tasks and get to them when it can?
   
   For almost a year we were running Airflow 1.10.9 and recently upgraded to 1.10.14.
   
   Number of times seeing this error in our logs:
   - 1.10.9 from 2020-11-01 to 2020-11-15 (**15 days**): **5805**
   - 1.10.14 on 2021-02-01 (**1 day**): **936,005**
   
   This is a huge increase and is now breaking our system. Most of the time, this will somehow recover after 9+ hours, but that makes our DAGs run far longer than their SLAs.
   
   <!-- What do you think went wrong? -->
   We upgraded our system from Airflow 1.10.9 running Azure Sql Server to Airflow 1.10.14 running Azure Database for Postgresql. I don't think the database change has anything to do with this, but I mention it for completeness. 
   
   **How to reproduce it**:
   It seems that Airflow needs to be flooded while using a sensor.  We may have to turn off sensors, but this will also have a negative impact since our worker slot number is capped at 48 and some of the tasks take up to 8 hours to run. Without sensors, they hold the worker slot for this entire duration.
   
   I have changed our poke_interval from 120 seconds to 900 seconds. This has reduced the problem, but I still see 240k+ instances of this error on 2/7.
   
   We are seeing this message between 70k - 900k+ times per day.
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] eladkal commented on issue #14129: Sensors in up_for_reschedule state report "dependency Not In Retry Period" for many hours, sometimes permanently

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #14129:
URL: https://github.com/apache/airflow/issues/14129#issuecomment-954641880


   This issue is reported against an EOL version of Airflow.
   Please recheck with latest Airflow version.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] eladkal closed issue #14129: Sensors in up_for_reschedule state report "dependency Not In Retry Period" for many hours, sometimes permanently

Posted by GitBox <gi...@apache.org>.
eladkal closed issue #14129:
URL: https://github.com/apache/airflow/issues/14129


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] davidmt1997 commented on issue #14129: Sensors in up_for_reschedule state report "dependency Not In Retry Period" for many hours, sometimes permanently

Posted by GitBox <gi...@apache.org>.
davidmt1997 commented on issue #14129:
URL: https://github.com/apache/airflow/issues/14129#issuecomment-925885966


   I have this exact same issue with custom sensors for AWS Glue jobs. Has this issue been resolved? Or is there any particular solution or workaround?
   Thanks


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org