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
This commit is contained in:
Arjan H
2022-08-06 16:41:11 +02:00
parent 9935b056c3
commit 09d2fcaf72

View File

@@ -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