Я пытаюсь включить использование Java Flight Recorder для сбора дампов потоков каждые 10 секунд при выполнении запросов Cypher с помощью Neo4j Desktop.Но на вкладке «настройки» (файл конфигурации) на рабочем столе Neo4j рекомендуемые параметры самописца не распознаются и выдают ошибку при запуске.
Я использую Oracle JDK 11.
Этиявляются команды, которые я ввел в файл -
# flight recorder settings
dbms.jvm.additional=-XX:+UnlockCommercialFeatures
dbms.jvm.additional=-XX:+FlightRecorder
dbms.jvm.additional=-XX:FlightRecorderOptions=stackdepth=500
dbms.jvm.additional=-XX:+UnlockDiagnosticVMOptions
dbms.jvm.additional=-XX:+DebugNonSafepoints
, и они выдают ошибку при запуске БД -
Active database: graph.db
Directories in use:
home: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3
config: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/conf
logs: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/logs
plugins: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/plugins
import: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/import
data: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/data
certificates: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/certificates
run: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/run
Starting Neo4j.
Unrecognized VM option 'UnlockCommercialFeatures'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Active database: graph.db
Directories in use:
home: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3
config: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/conf
logs: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/logs
plugins: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/plugins
import: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/import
data: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/data
certificates: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/certificates
run: /Users/manishgiri/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-4efa4b3e-50bc-46fa-90b2-ee6df8205205/installation-3.5.3/run
Starting Neo4j.
Unrecognized VM option 'FlightRecorder'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Я проверил, что Flight Recorder работает на моей машинепротестировав его на другой простой программе -
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=duration=120s,filename=myrecording.jfr OOMEGenerator
Эта команда работает нормально и успешно генерирует запись.
Есть ли другой способ включить настройки регистратора полета в файле конфигурации?