From 09d2fcaf7235e8d4b52352cc855907dcb02f5037 Mon Sep 17 00:00:00 2001 From: Arjan H Date: Sat, 6 Aug 2022 16:41:11 +0200 Subject: [PATCH] Set connMaxIdleTime in all db configs to prevent warnings in audit log Should no longer see these messages from now on: [mysql] closing bad idle connection: connection reset by peer [mysql] driver: bad connection --- gui/apply-boulder | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/apply-boulder b/gui/apply-boulder index 4517994..99c3f05 100755 --- a/gui/apply-boulder +++ b/gui/apply-boulder @@ -97,6 +97,10 @@ sed -i -e "s/\"username\": \".*\"/\"username\": \"$PKI_EMAIL_USER\"/" config/not sed -i -e "s/\"from\": \".*\"/\"from\": \"$PKI_EMAIL_FROM\"/" config/notify-mailer.json sed -i -e "s/\"purgeInterval\": \".*\"/\"purgeInterval\": \"1s\"/" config/akamai-purger.json +for fl in $(grep -Rl maxOpenConns config/); do + perl -i -p0e "s/( +)(\"maxOpenConns\": .*)/\1\2,\n\1\"connMaxIdleTime\": \"30s\"/g" $fl +done + if [ "$PKI_EMAIL_PASS" != "" ]; then sed -i -e "s/.*/$PKI_EMAIL_PASS/" secrets/smtp_password fi