Motivation
The initiative of this post is an error that I bumped into in the past for Airflow and I wish to document how to solve it if you came across them. Gonna be short
Introduction
The error message is shown below
airflow.exceptions.AirflowException: Task received SIGTERM signal
Solution
The solution for this problem is to adjust the settings for airflow.cfg
you need to locate the key work below
# When a task is killed forcefully, this is the amount of time in seconds that
# it has to cleanup after it is sent a SIGTERM, before it is SIGKILLED
killed_task_cleanup_time = 1200
We need to change this task to an arbitrarily large number (not too large as well)
# When a task is killed forcefully, this is the amount of time in seconds that
# it has to cleanup after it is sent a SIGTERM, before it is SIGKILLED
killed_task_cleanup_time = 604800
the main issue was that the task was receiving a SIGTERM signal before it finished running. We just wait a bit longer and be patient by change the configuration.