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 #338DescriptionWe 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? Activitychanged the title [-]Config to control location of pyroscooe.jfr files[/-] [+]Config to control location of pyroscope.jfr files[/+] on Jul 21, 2026korniltsev-grafanista commented on Jul 21, 2026 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. StevenCurran commented 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. korniltsev-grafanista commented on Jul 21, 2026 I guess one could kind of configure it through -Djava.io.tmpdir=/foo StevenCurran commented 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? StevenCurran commented on Jul 22, 2026 ContributorAuthor More actions #340
Added a PR for this here. korniltsev-grafanista commented on Jul 22, 2026 can you share or inspect the huge files? what is the duration of the recordings? korniltsev-grafanista commented on Jul 22, 2026 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. korniltsev-grafanista commented on Jul 22, 2026 I spawned two defensive fixes that may help, but it's worth confirming the root cause anyways
#341
#339 StevenCurran commented 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. StevenCurran commented on Aug 3, 2026 ContributorAuthor More actions korniltsev-grafanista commented on Aug 5, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|