You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Truong Duc Kien (Jira)" <ji...@apache.org> on 2020/01/17 09:22:00 UTC

[jira] [Commented] (AIRFLOW-4484) CeleryExecutor#sync timesout when fetching celery task state

    [ https://issues.apache.org/jira/browse/AIRFLOW-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17017833#comment-17017833 ] 

Truong Duc Kien commented on AIRFLOW-4484:
------------------------------------------

It seems that if Airflow is unable to fetch the Celery task state from the result backend within 2 seconds, the exception will be thrown. Should this 2 seconds timeout be made configurable ?

> CeleryExecutor#sync timesout when fetching celery task state
> ------------------------------------------------------------
>
>                 Key: AIRFLOW-4484
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4484
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: celery
>    Affects Versions: 1.10.3
>            Reporter: Teresa Martyny
>            Priority: Major
>             Fix For: 2.0.0
>
>
> We're seeing a quite a few process time outs raising during our core pipeline run. We traced it back to CeleryExecutor#sync calling #fetch_celery_task_state and timing out here:
>  
> airflow/utils/timeout.py:
> {code:python}
> def handle_timeout(self, signum, frame):
>  self.log.error("Process timed out, PID: %s", str(os.getpid()))
>  raise AirflowTaskTimeout(self.error_message)
> {code}
> called from here: airflow/executors/celery_executor.py#fetch_celery_task_state
> {code:python}
> with timeout(seconds=2):
>  # Accessing state property of celery task will make actual network request
>  # to get the current state of the task.
>  res = (celery_task[0], celery_task[1].state) 
> {code}
> along with an AirflowTaskTimeout raising here: airflow/executors/celery_executor.py#heartbeat
> {code:python}
> if isinstance(result, ExceptionWithTraceback): 
> self.log.error(
> CELERY_SEND_ERR_MSG_HEADER + ":{}\n{}\n".format(
> result.exception, result.traceback))
> {code}
>  
> This code was introduced in this new feature:
> https://issues.apache.org/jira/browse/AIRFLOW-2761
> Are there configuration settings that we need to set as a result of this new code to avoid these timeouts?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)