grafana / grafana/pyroscope

unable to write profiling data in disk

Open
#5,422 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
11.7k
Forks
802
Avg merge
1d 19h
Merged PRs (30d)
80

Description

#### Describe the bug
I deployed single mode pyroscope server using docker container. But it cannot write disk, log said segment writer init failed. But about 1 minute later, log shows normal. However, the mounted disk of host is still empty. Are the docker compose environment variables wrong? Please help me.

```
pyroscope:
image: harbor.dev.rdse.cloud.cnpc/cnpcrd/grafana/pyroscope:2.1.1
user: root
pull_policy: always
container_name: pyroscope
ports:
- "4040:4040"
volumes:
- /data/pyroscope_data:/var/lib/pyroscope
environment:
# 基础配置
- PYROSCOPE_TARGET=all
- PYROSCOPE_STORAGE_BACKEND=filesystem
- PYROSCOPE_STORAGE_FILESYSTEM_DIR=/var/lib/pyroscope/data
- PYROSCOPE_SERVER_HTTP_LISTEN_ADDR=0.0.0.0:4040
- PYROSCOPE_SERVER_LOG_LEVEL=info
- PYROSCOPE_ANALYTICS_REPORTING_ENABLED=false
- PYROSCOPE_MULTITENANCY_ENABLED=false

# 所有 ring 使用 inmemory(单节点必须)
- PYROSCOPE_DISTRIBUTOR_RING_STORE=inmemory
- PYROSCOPE_INGESTER_LIFECYCLER_RING_STORE=inmemory
- PYROSCOPE_SEGMENT_WRITER_LIFECYCLER_RING_STORE=inmemory
- PYROSCOPE_COMPACTOR_RING_STORE=inmemory
- PYROSCOPE_STORE_GATEWAY_SHARDING_RING_STORE=inmemory

# 副本因子
- PYROSCOPE_INGESTER_LIFECYCLER_RING_REPLICATION_FACTOR=1
- PYROSCOPE_SEGMENT_WRITER_LIFECYCLER_RING_REPLICATION_FACTOR=1
# 移除 command 和 config.yaml 挂载
networks:
- pyroscope-net
-
```

```
ts=2026-07-27T08:33:43.384117615Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:33:48.384478942Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:33:53.383357583Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:33:53.531274316Z caller=worker.go:384 level=info component=compaction-worker job=20e0d078c189f5b9-T-S3-L0 msg="starting compaction job" source_blocks="01KYHB9PX031RX1N7NB19211A8 01KYHB9YQ0V05VNFGNHP3CKG9H 01KYHBA525A8Y1FPJ9MGGBNNJ9 01KYHBA5HRM7663C4B5XYJEW5X 01KYHBADBRS6SNH6M1DYWJ90YG 01KYHBAM6GPG9Q40BAZAS5R7TS 01KYHBAW0GJSYQFGBAA28QDHQY"
ts=2026-07-27T08:33:53.573618575Z caller=worker.go:458 level=info component=compaction-worker job=20e0d078c189f5b9-T-S3-L0 msg="compaction finished successfully" input_blocks=7 output_blocks=1
ts=2026-07-27T08:33:58.384186046Z caller=worker.go:258 level=info component=compaction-worker msg="sending update for completed job" job=20e0d078c189f5b9-T-S3-L0
ts=2026-07-27T08:33:58.384396031Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=1 capacity=8
ts=2026-07-27T08:34:03.383718468Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:08.383730676Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:13.383636913Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:18.384175458Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:23.383559987Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:28.384428108Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:33.383953467Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:38.384141086Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:39.346050604Z caller=worker.go:384 level=info component=compaction-worker job=e455e25f55219e8c-T-S3-L0 msg="starting compaction job" source_blocks="01KYHBB2BN1W7HTE73FK3R52RA 01KYHBB2V833ZT4Y4T0H4E8NMB 01KYHBBAN8HV03Y9V0D5P9TET4 01KYHBBHG0SDRGVH0MJWVRBH1E 01KYHBBSA025YGYETB45ZRK3BJ 01KYHBBZN4FT6DTRD9A3HBKEPF 01KYHBC04RKW35E8W8CH817T4X 01KYHBC7YRY84SSBA3T750SZXD"
ts=2026-07-27T08:34:39.398308276Z caller=worker.go:458 level=info component=compaction-worker job=e455e25f55219e8c-T-S3-L0 msg="compaction finished successfully" input_blocks=8 output_blocks=1
ts=2026-07-27T08:34:43.384108085Z caller=worker.go:258 level=info component=compaction-worker msg="sending update for completed job" job=e455e25f55219e8c-T-S3-L0
ts=2026-07-27T08:34:43.384439738Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=1 capacity=8
ts=2026-07-27T08:34:48.383853782Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:53.38389618Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:34:58.384089297Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:03.384001039Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:08.384413231Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:13.384387299Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:18.383354549Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:23.384370869Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:23.46582793Z caller=worker.go:384 level=info component=compaction-worker job=be9fbc6cfc850737-T-S3-L0 msg="starting compaction job" source_blocks="01KYHBCESH9ZNTX0MCK0Q4GN96 01KYHBCPKG54M1J2CPH25NAN47 01KYHBCWYM5J1KND5FKSD4FX0D 01KYHBCXE8VD5W99QC6FZHEHCT 01KYHBD58964Y4P1755742C2XH 01KYHBDC30420NCJT7H41AM81Q 01KYHBDKX0Q16FJRX807H66J92"
ts=2026-07-27T08:35:23.515587037Z caller=worker.go:458 level=info component=compaction-worker job=be9fbc6cfc850737-T-S3-L0 msg="compaction finished successfully" input_blocks=7 output_blocks=1
ts=2026-07-27T08:35:28.383794639Z caller=worker.go:258 level=info component=compaction-worker msg="sending update for completed job" job=be9fbc6cfc850737-T-S3-L0
ts=2026-07-27T08:35:28.384174789Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=1 capacity=8
ts=2026-07-27T08:35:33.384020427Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:38.383653317Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:43.383418917Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:48.383404426Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:53.384266149Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:35:58.384372621Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
ts=2026-07-27T08:36:03.383983975Z caller=worker.go:224 level=info component=compaction-worker msg="polling compaction jobs" updates=0 capacity=8
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the single-mode Docker Compose deployment with the shown environment variables and volume mapping. Inspect the segment-writer and compaction logs, then verify whether profiling data appears under /var/lib/pyroscope/data and persists in the host's /data/pyroscope_data mount.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
infrastructure, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.