Skip to content

Commit e4a6d20

Browse files
fix(docker): disable TLS to the internal Postgres (root cause of the JDBC direct-buffer OOM) (#1335)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4ad4176 commit e4a6d20

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

docker/compose.app.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ services:
107107
# + docker/compose.core.yaml). Disable it here so the receiver beans don't load
108108
# in application-server (saves RAM; prevents accidental localhost traffic).
109109
HEPHAESTUS_RUNTIME_WEBHOOK_ENABLED: "false"
110-
DATABASE_URL: postgresql://postgres:5432/hephaestus
110+
# Internal, trusted docker-network DB: skip TLS. pgJDBC doesn't validate Postgres' self-signed cert
111+
# so it adds no authentication, only the SSL handshake's NIO direct buffers that OOM the JVM off-heap
112+
# default; confidentiality is fine to drop here (creds already sit in plaintext compose env).
113+
DATABASE_URL: postgresql://postgres:5432/hephaestus?sslmode=disable
111114
DATABASE_USERNAME: root
112115
DATABASE_PASSWORD: root
113116
NATS_SERVER: nats://nats-server:4222
@@ -296,7 +299,10 @@ services:
296299
SENTRY_DSN: ${SENTRY_DSN}
297300
# Persistence for the JPA layer the worker shares (connection-credential AttributeConverter,
298301
# workspace/agent context). The auth web layer is gated off this role, so no auth env is needed.
299-
DATABASE_URL: postgresql://postgres:5432/hephaestus
302+
# Internal, trusted docker-network DB: skip TLS. pgJDBC doesn't validate Postgres' self-signed cert
303+
# so it adds no authentication, only the SSL handshake's NIO direct buffers that OOM the JVM off-heap
304+
# default; confidentiality is fine to drop here (creds already sit in plaintext compose env).
305+
DATABASE_URL: postgresql://postgres:5432/hephaestus?sslmode=disable
300306
DATABASE_USERNAME: root
301307
DATABASE_PASSWORD: root
302308
# CredentialBundleConverter (JPA AttributeConverter) decrypts connection credentials on every role.

docker/compose.core.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ services:
2626
WEBHOOK_SECRET: ${WEBHOOK_SECRET}
2727
# DataSource for the JPA layer (the connection-credential AttributeConverter that the HMAC
2828
# path reads); the auth web layer and workspace-context filter are gated off this role.
29-
DATABASE_URL: postgresql://postgres:5432/hephaestus
29+
# Internal, trusted docker-network DB: skip TLS. pgJDBC doesn't validate Postgres' self-signed cert
30+
# so it adds no authentication, only the SSL handshake's NIO direct buffers that OOM the JVM off-heap
31+
# default; confidentiality is fine to drop here (creds already sit in plaintext compose env).
32+
DATABASE_URL: postgresql://postgres:5432/hephaestus?sslmode=disable
3033
DATABASE_USERNAME: root
3134
DATABASE_PASSWORD: root
3235
# CredentialBundleConverter (JPA AttributeConverter) decrypts connection credentials on every role.

docker/preview/compose.app.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ services:
198198
HEPHAESTUS_AGENT_IMAGE_REQUIRE_DIGEST: ${HEPHAESTUS_AGENT_IMAGE_REQUIRE_DIGEST:-false}
199199
# URL - Coolify provides SERVICE_FQDN_WEBAPP
200200
APPLICATION_HOST_URL: https://${SERVICE_FQDN_WEBAPP}
201-
DATABASE_URL: postgresql://postgres:5432/hephaestus
201+
# Internal, trusted docker-network DB: skip TLS. pgJDBC doesn't validate Postgres' self-signed cert
202+
# so it adds no authentication, only the SSL handshake's NIO direct buffers that OOM the JVM off-heap
203+
# default; confidentiality is fine to drop here (creds already sit in plaintext compose env).
204+
DATABASE_URL: postgresql://postgres:5432/hephaestus?sslmode=disable
202205
DATABASE_USERNAME: hephaestus
203206
DATABASE_PASSWORD: ${POSTGRES_PASSWORD:-hephaestus-preview}
204207
# Shared infrastructure (must match shared-infra service names with UUID suffix)

0 commit comments

Comments
 (0)