2
我啓用了在Heroku上運行的Clojure應用程序的New Relic監控。爲了避免在Leiningen的JVM過程中嵌套我的應用程序的開銷,我啓動了lein trampoline run
。避免在Heroku上附加leiningen的新遺物
這顯然增加了從New Relic附加到最初Leiningen過程的一些開銷,然後關閉並啓動我的應用程序,導致New Relic再次附加延遲。這有時會導致在30秒的啓動超時窗口內無法啓動並導致停機。
日誌輸出,顯示啓動兩個新的文物代理:
heroku/web.1: Starting process with command `lein trampoline run`
app/web.1: [date] NewRelic 1 INFO: Agent is using Log4j
app/web.1: [date] NewRelic 1 INFO: Loading configuration file "/app/newrelic/./newrelic.yml"
app/web.1: [date] NewRelic 1 INFO: Agent Host: 866e2426-7a0f-4293-ae89-b55c0332253e IP: 10.159.0.212
app/web.1: [date] NewRelic 1 INFO: Setting audit_mode to false
app/web.1: [date] NewRelic 1 INFO: Setting protocol to "http"
app/web.1: [date] NewRelic 1 INFO: Configuration file is /app/newrelic/./newrelic.yml
app/web.1: [date] NewRelic 1 INFO: New Relic Agent v2.9.0 has started
app/web.1: [date] NewRelic 1 INFO: Java version: 1.6.0_20
app/web.1: [date] NewRelic 1 INFO: Agent class loader: [email protected]
app/web.1: [date] NewRelic 5 INFO: JVM is shutting down
app/web.1: [date] NewRelic 5 INFO: New Relic Agent has shutdown
app/web.1: [date] NewRelic 1 INFO: Agent is using Log4j
app/web.1: [date] NewRelic 1 INFO: Loading configuration file "/app/newrelic/./newrelic.yml"
app/web.1: [date] NewRelic 1 INFO: Agent Host: 866e2426-7a0f-4293-ae89-b55c0332253e IP: 10.159.0.212
app/web.1: [date] NewRelic 1 INFO: Configured to connect to New Relic at collector.newrelic.com:80
app/web.1: [date] NewRelic 1 INFO: Setting audit_mode to false
app/web.1: [date] NewRelic 1 INFO: Setting protocol to "http"
app/web.1: [date] NewRelic 1 INFO: Configuration file is /app/newrelic/./newrelic.yml
app/web.1: [date] NewRelic 1 INFO: New Relic Agent v2.9.0 has started
app/web.1: [date] NewRelic 1 INFO: Java version: 1.6.0_20
app/web.1: [date] NewRelic 1 INFO: Agent class loader: [email protected]
有沒有一種方法,以避免New Relic的附加到leiningen過程?
不會用蹦牀解決這個問題嗎?腿人增加了多少開銷? –
它增加了足夠的開銷,我得到了非常一致的R14(超出內存配額)錯誤,即使使用最低的最大堆設置。用蹦牀我可以運行-Xmx400m沒有問題。 – Lyle
嗨萊爾 - 你有沒有解決這個問題?我正在努力將NewRelic添加到Heroku-Clojure應用程序中。 – espeed