Open u1735067 opened 1 year ago
Sorry for the delay! :sob:
Unfortunately, I think tuning PostgreSQL for use within Swarm is probably out of scope for this repository. :see_no_evil: :disappointed:
Maybe we can add back a really small blurb about the problem in the docs, perhaps using this issue as our link instead of that old success article?
The issue https://github.com/docker-library/postgres/issues/538 introduced a warning in the README about the Docker Swarm IPVS LB that timeouts TCP connections after 900 secs, which is lower than
tcp_keepalive_time
, so idle connections might become unavailable (cut byIPVS
) while still being needed later, and that warning have since been removed (https://github.com/docker-library/docs/commit/5e28015ab2d9039a28daca5f7d65be996eb39234), probably due to the link being broken.Could it be possible to reintroduce a warning about this, and/or to propose a default
-ctcp_keepalives_idle=870
value (for example; and maybetcp_keepalives_interval
+tcp_keepalives_count
)?The old "success" documentation is visible at https://web.archive.org/web/20200611114911/https://success.docker.com/article/ipvs-connection-timeout-issue.
Possible solutions are:
tasks.<service_name>
endpoint_mode: dnsrr
to prevent using the LBnet.ipv4.tcp_keepalive_time: 870
(<900
)-ctcp_keepalives_idle=870
(<900
)Example of all solutions (only one needed):