From ba535c6ee69273c9cd5f1f71c2c528a71106ae0b Mon Sep 17 00:00:00 2001 From: kudesn1k Date: Tue, 6 Oct 2026 15:54:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D1=8F?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8C=20PostgreSQL=20=D0=BF=D0=BE=20TCP=20=D0=B8=20?= =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=B8=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=BC=D1=8F=D1=82=D1=8C=20Valkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose.yaml | 4 +++- infra/valkey/valkey.conf | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/compose.yaml b/compose.yaml index b21072f2..721398ba 100644 --- a/compose.yaml +++ b/compose.yaml @@ -41,7 +41,9 @@ services: volumes: - pgdata:/var/lib/postgresql healthcheck: - test: ["CMD", "pg_isready", "-U", "messenger", "-d", "messenger"] + # Over TCP: during first initialisation the image runs a temporary + # server on the Unix socket only, which must not count as ready. + test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "messenger", "-d", "messenger"] interval: 5s timeout: 3s retries: 10 diff --git a/infra/valkey/valkey.conf b/infra/valkey/valkey.conf index f417d667..d7e96bff 100644 --- a/infra/valkey/valkey.conf +++ b/infra/valkey/valkey.conf @@ -9,8 +9,10 @@ dir /data # The append-only file already persists everything; RDB snapshots are off. save "" -# Sessions are never evicted to free memory: a full store refuses new logins -# (503) instead of silently logging users out. +# Sessions are never evicted to free memory: once maxmemory is reached the +# store refuses new sessions (login answers 503) instead of silently logging +# users out. A session key takes about a hundred bytes. +maxmemory 256mb maxmemory-policy noeviction # requirepass comes from the compose secret, never from the repository.