[1.18.2 forge] Java Flight Recorder (jfr) always running

My 1.18 servers always have jfr running despite not being referenced in any startup arguments.

Is there a way to configure a 1.18 (forge) server so that jfr isn’t running?
Arranging to run “/jfr stop” after (re)starting a server is a bit sub-optimal !

Sounds more like a forge forum question.

Looks like it was added to actual Minecraft itself news to me

You can try these not sure if they will work tbh.

-XX:-UnlockCommercialFeatures
-XX:-FlightRecorder

-XX:-UsePerfData also seems to be something that is capturing

all this should be on demand though and they both have commands that can be ran not sure why the JFR would be automatically running on server boot out the box? Sorry i am not familiar with modern Minecraft and its conventions. I would have to play around with it to work it out but i don’t have time for that. Try those flags and see if they work.

1 Like

I actually just came across this as I found my server was out of space!
I discovered the debug directory which had the recordings and they were about 4 gigs. I am going to use the JFR disable commands (requires the enable and the flight recorder options together) and will let you know.

In my test I got an unrecognized option error with the enableCommercialFeatures (seems to depend on you’re java version) - using just the flightrecorder appears to work, so far.

Good to know

it makes no sense to me why they have this turned on by default because this is going to impact performance? its logging and profiling the server when its probably not needed, it should be a use case thing imo.

The io impact alone and if you saying 4gb of data for each recording that is a lot of read/writes problems too, then the logistics of the wasted space etc.

It isn’t 4GB each - it was accumulated.
Having troubles now turning off from the UI. I had added it in the unix-args.txt file and it worked once. I don’t know what’s happening now :smiley: