From 72c1e495d89259151e73947a057432d528b06bb0 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 7 Feb 2025 19:51:15 +0530 Subject: [PATCH] fix(DX): Print traceback of timed out requests (#6) --- gunicorn/workers/gthread.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/workers/gthread.py b/gunicorn/workers/gthread.py index c1af9261..1e0555cd 100644 --- a/gunicorn/workers/gthread.py +++ b/gunicorn/workers/gthread.py @@ -12,6 +12,7 @@ from concurrent import futures import errno +import faulthandler import os import selectors import socket @@ -253,6 +254,7 @@ class ThreadWorker(base.Worker): if current_time > fut._request_timeout: self.alive = False self.log.error("A request timed out. Exiting.") + faulthandler.dump_traceback() self.tpool.shutdown(False) self.poller.close()