aoen commented on a change in pull request #5605: [AIRFLOW-4883] Kill hung file
process managers
URL: https://github.com/apache/airflow/pull/5605#discussion_r306043824
##########
File path: airflow/utils/dag_processing.py
##########
@@ -1229,6 +1243,21 @@ def heartbeat(self):
return simple_dags
+ def _kill_timed_out_processors(self):
+ """
+ Kill any file processors that timeout to defend against process hangs.
+ """
+ now = timezone.utcnow()
+ for file_path, processor in self._processors.items():
+ duration = now - processor.start_time
+ if duration > self._processor_timeout:
+ self.log.info(
+ "Processor for %s with PID %s started at %s has timed out,
"
+ "killing it.",
+ processor.file_path, processor.pid,
processor.start_time.isoformat())
+ Stats.incr('dag_file_processor_timeouts', 1, 1)
+ processor.kill()
Review comment:
Fix is here: https://github.com/apache/airflow/pull/5639
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services