From 18f2c03655560479b89e3765b1d0c5a42f1f61e8 Mon Sep 17 00:00:00 2001
From: Lars Beckers <lars.beckers@rwth-aachen.de>
Date: Mon, 4 Dec 2017 19:24:49 +0100
Subject: [PATCH] add SIGPIPE handler to RT config

This prevents the RT FCGI-Service from termination, because of the
missing signal handler. Nginx emits the signal on prematurely closed
connections. This happens more frequently than one would assume.
---
 request-tracker/templates/RT_SiteConfig.pm.j2 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/request-tracker/templates/RT_SiteConfig.pm.j2 b/request-tracker/templates/RT_SiteConfig.pm.j2
index d40e856..5ade83c 100644
--- a/request-tracker/templates/RT_SiteConfig.pm.j2
+++ b/request-tracker/templates/RT_SiteConfig.pm.j2
@@ -97,3 +97,10 @@ Set($NotifyActor, 1);
 Set($LogoAltText, '{{rt_logotext}}');
 Set($LogoLinkURL, '{{rt_logolinkurl}}');
 #Set($LogoURL, it’s easier to upload this in the web interface);
+
+# should prevent crashing caused by nginx
+# from: https://rt-wiki.bestpractical.com/wiki/FreeBSDInstallGuide
+$SIG{'PIPE'} = sub { 
+	print STDERR "SIGPIPE @_\n";
+};
+
-- 
GitLab