Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN export GLIBC_VERSION=2.29-r0 \
&& export MYSQL_FILE_TAR=$MYSQL_FILE_BASE.tar.gz \
&& export MYSQL_FILE_BIN=$MYSQL_FILE_BASE-bin.jar \
&& export MYSQL_DOWNLOAD_URL=https://dev.mysql.com/get/Downloads/Connector-J/$MYSQL_FILE_TAR \
&& export POSTGRESQL_DRIVER_VERSION=42.2.5 \
&& export POSTGRESQL_DRIVER_VERSION=42.4.0 \
&& export POSTGRESQL_FILE=postgresql-$POSTGRESQL_DRIVER_VERSION.jar \
&& export POSTGRESQL_DOWNLOAD_URL=https://jdbc.postgresql.org/download/$POSTGRESQL_FILE \
&& rm -f $JIRA_LIB/mysql-connector-java*.jar \
Expand Down
5 changes: 5 additions & 0 deletions bin/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if [ -n "$JIRA_DATABASE_URL" ]; then
if [ "$JIRA_DB_TYPE" == "mssql" ]; then
SCHEMA='<schema-name>dbo</schema-name>'
fi
case $JIRA_DB_TYPE in postgres*)
# see https://confluence.atlassian.com/jirakb/connection-problems-to-postgresql-result-in-stuck-threads-in-jira-1047534091.html
PG_CONN_PROPERTIES="<connection-properties>tcpKeepAlive=true;socketTimeout=240</connection-properties>"
esac

cat <<END > ${JIRA_HOME}/dbconfig.xml
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -49,6 +53,7 @@ if [ -n "$JIRA_DATABASE_URL" ]; then
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-test-on-borrow>false</pool-test-on-borrow>
<pool-test-while-idle>true</pool-test-while-idle>
$PG_CONN_PROPERTIES
</jdbc-datasource>
</jira-database-config>
END
Expand Down