Skip to content

Commit 9c3a929

Browse files
🗃️ Postgres: set statement timeout 🚨 ⚠️ DEVOPS (#7858)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 912ecb3 commit 9c3a929

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

services/docker-compose.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,21 @@ services:
13331333
# - net.ipv4.tcp_keepalive_intvl=600
13341334
# - net.ipv4.tcp_keepalive_probes=9
13351335
# - net.ipv4.tcp_keepalive_time=600
1336-
command: [ "postgres", "-c", "tcp_keepalives_idle=600", "-c", "tcp_keepalives_interval=600", "-c", "tcp_keepalives_count=5", "-c", "max_connections=413", "-c", "shared_buffers=256MB" ]
1336+
#
1337+
command:
1338+
[
1339+
"postgres",
1340+
"-c", "tcp_keepalives_idle=600",
1341+
"-c", "tcp_keepalives_interval=600",
1342+
"-c", "tcp_keepalives_count=5",
1343+
"-c", "max_connections=413",
1344+
"-c", "shared_buffers=256MB",
1345+
# statement_timeout is set to 120 seconds (120_000 in ms), so that long running queries
1346+
# are killed after 2 minutes. Since simcore services have timeout of 1 minute, so longer
1347+
# queries will not be used. Setting >1 minutes to be safe
1348+
# https://github.com/ITISFoundation/osparc-simcore/issues/7682#issuecomment-2923048445
1349+
"-c", "statement_timeout=120000"
1350+
]
13371351

13381352
redis:
13391353
image: "redis:6.2.6@sha256:4bed291aa5efb9f0d77b76ff7d4ab71eee410962965d052552db1fb80576431d"

0 commit comments

Comments
 (0)