unraid / unraid/api

GraphQL metrics temperature query spins up all array disks

Open
#2,017 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
113
Forks
22
Avg merge
10h 40m
Merged PRs (30d)
13

Description

Environment

Unraid OS Version: 7.3 (Unraid OS)

Are you using a reverse proxy? No

Pre-submission Checklist

  • I have verified that my Unraid OS is up to date
  • I have tested this issue by accessing my server directly (not through a reverse proxy)
  • This is not an Unraid Connect related issue (if it is, please submit via the support form instead)

Issue Description

Calling the metrics GraphQL query to fetch temperature data triggers a spin-up of all array disks. The first request after disks have spun down takes ~5 seconds to respond because it waits for every disk to spin up. Subsequent requests are fast since the disks are already active.

This affects any application that polls temperature data periodically (e.g., monitoring dashboards), as each poll cycle causes unnecessary disk spin-ups, increasing wear, power consumption, and noise.

Steps to Reproduce

  1. Ensure all array disks are in a spindown (sleep) state.
  2. Execute the following query against the GraphQL API:
    query {
    metrics {
    temperature {
    summary {
    average
    hottest { name, current { value, status } }
    }
    }
    }
    }
  3. Observe that the response takes several seconds and all array disks spin up during the request.

Expected Behavior

Temperature data comes from hardware sensors (e.g., lm-sensors, /sys/class/thermal/) and should be completely independent of array disk I/O. The query should return quickly regardless of whether disks are spun down.

Actual Behavior

All array disks are woken up during the temperature query. The first request after spin-down takes approximately 5 seconds to complete, as it waits for every disk to spin up before returning a response.

Additional Context

Questions:

  1. Does the temperature endpoint iterate over array disks for some reason? Could it use a sensor-only path that
    doesn't trigger disk access?
  2. Is there a way to fetch temperature data without waking disks (e.g., reading from a cached value or a daemon that polls sensors independently)?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the GraphQL metrics temperature query and its temperature endpoint, then reproduce the request with array disks spun down. Check which temperature data path causes disk access; done means the query returns without waking array disks and still reports the expected temperature summary.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.