teamatldocker / jira

Dockerized Atlassian Jira
https://hub.docker.com/r/teamatldocker/jira/
MIT License
437 stars 223 forks source link

Update postgres connections to use tcpKeepAlive and socketTimeout #155

Open rwarren opened 1 year ago

rwarren commented 1 year ago

This fixes potential stuck threads in "some situations", as documented by Atlassian here:

https://confluence.atlassian.com/jirakb/connection-problems-to-postgresql-result-in-stuck-threads-in-jira-1047534091.html


Doing this required two things:

  1. Updating the postgres jar file (latest is currently 42.4.0)
  2. Adding the indicated <connection-properties> when using postgres

This works well in my testing... with the only thing being that I'm not yet sure why the container still has the old 42.2.25 jar in it:

$ docker exec -it jira bash
bash-5.1$ find / -name "postgres*jar" 2>/dev/null
/opt/jira/lib/postgresql-42.4.0.jar
/opt/jira/lib/postgresql-42.2.25.jar
bash-5.1$
rwarren commented 1 year ago

I should also add that newer versions of Jira (I first saw it in 8.22.6 but maybe slightly sooner?) now highlight that this change should be done with a post-boot welcome page. This PR fixes the problem and prevents this message.