我正在使用newrelic代理在Heroku上运行java应用程序。我从日志中看到它可以采取> 8秒启动newrelic代理 - 有时更多。从下面的示例看,加载检测需要2秒,连接到新的文件服务器可能需要5秒。
我有什么办法可以加快速度吗?有时似乎事情比平常工作慢,我达到了90s启动heroku限制(Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
)。
以下所示的大多数仪器都不是必需的。
感谢。
05:56:21 +0000 [4 1] com.newrelic INFO: New Relic Agent: Loading configuration file "/app/newrelic/./newrelic.yml"
05:56:21 +0000 [4 1] com.newrelic INFO: New Relic Agent v3.37.0 is initializing...
05:56:22 +0000 [4 1] com.newrelic.agent.deps.org.reflections.Reflections WARN: given scan urls are empty. set urls in the configuration
... 46 others
05:56:22 +0000 [4 8] com.newrelic INFO: Instrumentation com.newrelic.instrumentation.akka-2.2 is enabled. Loading.
05:56:23 +0000 [4 11] com.newrelic INFO: Instrumentation com.newrelic.instrumentation.async-http-client-2.0.0 is enabled. Loading.
... 128 others
05:56:23 +0000 [4 6] com.newrelic INFO: Instrumentation com.newrelic.instrumentation.solr-1.4.0 is enabled. Loading.
05:56:27 +0000 [4 1] com.newrelic.agent.RPMServiceManagerImpl INFO: Configured to connect to New Relic at collector.newrelic.com:443
05:56:27 +0000 [4 1] com.newrelic INFO: Setting audit_mode to false
05:56:27 +0000 [4 1] com.newrelic INFO: Setting protocol to "https"
05:56:28 +0000 [4 1] com.newrelic.agent.config.ConfigServiceImpl INFO: Configuration file is /app/newrelic/./newrelic.yml
05:56:28 +0000 [4 1] com.newrelic INFO: New Relic Agent v3.37.0 has started
05:56:28 +0000 [4 1] com.newrelic INFO: Agent class loader: com.newrelic.bootstrap.BootstrapAgent$JVMAgentClassLoader@533ddba
05:56:28 +0000 [4 1] com.newrelic INFO: Premain startup complete in 7,981ms
答案 0 :(得分:0)
如何更改此配置值?
https://docs.newrelic.com/docs/agents/java-agent/configuration/java-agent-configuration-config-file
sync_startup 类型布尔值默认值false 在应用启动时立即启用代理以连接New Relic收集器。