Skip to content

Fail to create replica for clickhouse shard #112

Open
@StuDDXT1610

Description

@StuDDXT1610

Hi, i deployed Langfuse using the official Helm guide: Self-Hosting with Kubernetes Helm, the Clickhouse pod shards 0-1 and 0-2 was failed to create and logged

<Information> StatusFile: Status file /bitnami/clickhouse/data/status already exists - unclean restart. Contents:
PID: 42
Started at: 2025-03-25 03:07:57
Revision: 54495
2025.03.25 03:26:53.212463 [ 41 ] {} <Information> Application: Shutting down storages.
2025.03.25 03:26:53.212763 [ 41 ] {} <Information> Application: Waiting for background threads
2025.03.25 03:26:53.212992 [ 41 ] {} <Information> Application: Background threads finished in 0 ms
2025.03.25 03:26:53.213497 [ 41 ] {} <Error> Application: Code: 76. DB::Exception: Cannot lock file /bitnami/clickhouse/data/status. Another server instance in same directory is already running. (CANNOT_OPEN_FILE), Stack trace (when copying this message, always include the lines below):
0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000d74fa3b
...

Steps to Reproduce:

Follow the steps in the Langfuse Helm installation guide.
Deploy using Helm.
Setting Clickhouse env vars:

-CLICKHOUSE_USER="default"
-CLICKHOUSE_DB="default"
-CLICKHOUSE_CLUSTER_ENABLED=true
-CLICKHOUSE_URL=http://langfuse-clickhouse:8123
-CLICKHOUSE_MIGRATION_URL=clickhouse://langfuse-clickhouse:9000

value:
clickhouse:
deploy: true
startupProbe:
  enabled: true
  failureThreshold: 5
  initialDelaySeconds: 20
  periodSeconds: 20
  successThreshold: 1
  timeoutSeconds: 2
shards: 1 # Fixed. Langfuse does not support multi-shard clusters.
replicaCount: 3
resourcesPreset: large
persistence:
  enabled: true
  existingClaim: clickhouse-pvc
  size: 20Gi  
  storageClass: "my-storage"

Results:
clickhouse shard error and langfuse web pod enter CrashLoopBackOff.

Expected Behavior:
All clickhouse shard are running successfully

Thank You !

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions