GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Config to control location of pyroscope.jfr files · Issue #338 · grafana/pyroscope-java

Config to control location of pyroscope.jfr files #338

New issue
Copy link
New issue
Copy link
Closed
Closed
Config to control location of pyroscope.jfr files#338
Copy link

Description

@StevenCurran
StevenCurran
opened on Jul 21, 2026
Issue body actions

We enabled this across a large number of apps on our physical hosts and it filled up our /tmp dir with large pyroscope.jfr files, some as large as 1gb per file.

When looking at the source it's creating these with Files.createTempFile with no way to override. Does not appear to be configurable.

Is this something I cannot find, or is this a gap? I'd be willing to make the change and raise a pr to add a path where these could write to, but just want to confirm there no no current way to set this currently.

I'd also like to know what would cause these huge jfr files? Will they remain until uploaded to the alloy endpoint, and if the upload fails does this mean the files will accumulate forever, or what controls / purge policy is there around controlling disk usage?

Activity

  1. StevenCurran
    changed the title [-]Config to control location of pyroscooe.jfr files[/-] [+]Config to control location of pyroscope.jfr files[/+] on Jul 21, 2026
  2. korniltsev-grafanista commented on Jul 21, 2026

    @korniltsev-grafanista
    korniltsev-grafanista
    on Jul 21, 2026
    Contributor
    More actions

    1gb per file is likely a bug, either a misconfiguration on your side (for example setting a upload interval=1hour and recording every allocation). Or a bug somewhere on the side of pyroscope-java, maybe somehow we start proifiling but for some reason never stop.
    Do you have any pointers how to reproduce? Are there any logs/stacktraces in the target app?
    Please share the way you run the agent.

    Does not appear to be configurable. Is this something I cannot find, or is this a gap?

    ATM there is no option to configure this. PRs are welcome

    I'd also like to know what would cause these huge jfr files?

    Lets try to find the root cause.
    Please share your configuration and environment, software version, check logs. Are you sure you don't run alloy with pyroscope.java compoenntn in addition to the pyroscope-java ?

    in the meanwhile we will try to think a bit how this could be possible.

  3. StevenCurran commented on Jul 21, 2026

    @StevenCurran
    StevenCurran
    on Jul 21, 2026
    ContributorAuthor
    More actions

    We are running about 20-30 jvms per host, looks to be on apps that are gc'g a lot, likely as we have too small heap allocated. But rest of the procs are fine. Rhel 8 host, jdk 25.

    Jfr format, itimer, 512k alloc, 10ms interval, 15s upload unterval for the settings to the agent.

  4. korniltsev-grafanista commented on Jul 21, 2026

    @korniltsev-grafanista
    korniltsev-grafanista
    on Jul 21, 2026
    Contributor
    More actions

    I guess one could kind of configure it through -Djava.io.tmpdir=/foo

  5. StevenCurran commented on Jul 21, 2026

    @StevenCurran
    StevenCurran
    on Jul 21, 2026
    ContributorAuthor
    More actions

    Yes but we don't really want to set this just for pyroscope. I'll try raise a pr to make it configurable. On the files being created unbounded, can this happen from failed writes to the alloy agent? And do my other settings look okay?

  6. StevenCurran commented on Jul 22, 2026

    @StevenCurran
    StevenCurran
    on Jul 22, 2026
    ContributorAuthor
    More actions

    #340

    Added a PR for this here.

  7. korniltsev-grafanista commented on Jul 22, 2026

    @korniltsev-grafanista
    korniltsev-grafanista
    on Jul 22, 2026
    Contributor
    More actions

    can you share or inspect the huge files? what is the duration of the recordings?

  8. korniltsev-grafanista commented on Jul 22, 2026

    @korniltsev-grafanista
    korniltsev-grafanista
    on Jul 22, 2026
    Contributor
    More actions

    please share debug logs from the profiler
    in particular this line 2026-07-22 11:09:25.492 [DEBUG] Config: Config{agentEnabled=true, applicationName='... and all exceptions if any.

  9. korniltsev-grafanista commented on Jul 22, 2026

    @korniltsev-grafanista
    korniltsev-grafanista
    on Jul 22, 2026
    Contributor
    More actions

    I spawned two defensive fixes that may help, but it's worth confirming the root cause anyways
    #341
    #339

  10. StevenCurran commented on Jul 22, 2026

    @StevenCurran
    StevenCurran
    on Jul 22, 2026
    ContributorAuthor
    More actions

    I can do it once we have this tmp file support, we have a very low allocation on tmp on our hosts, so want to be safe first of all.

  11. StevenCurran commented on Aug 3, 2026

    @StevenCurran
    StevenCurran
    on Aug 3, 2026
    ContributorAuthor
    More actions

    @korniltsev-grafanista now this is merged are you able to cut a new release?

  12. korniltsev-grafanista commented on Aug 5, 2026

    @korniltsev-grafanista
    korniltsev-grafanista
    on Aug 5, 2026
    Contributor
    More actions

    https://github.com/grafana/pyroscope-java/releases/tag/v2.9.0

    Reacted by StevenCurran
  13. korniltsev-grafanista
    closed this as completedon Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.