Nondeterministic Rails initialization errors when NewRelic installed
It appears that sometimes when our mongrels are restarted, with the NewRelic RPM plugin installed, some of the mongrels will not properly initialize the rest of the Rails environment. This causes our mongrels to give errors related to uninitialized constants in our code base not related to NewRelic. Has this been seen before and is there a work around?
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Note this is on a Rails 2.0 release.
-
Inappropriate?Hi Zev,
This problem had been reported with earlier versions of our agent, however we haven't seen this behavior since 2.5.3. What version of our agent do you have?
- Jim -
Inappropriate?Zev, actually I think I've seen this in a different form with one other customer. We have not found a solution for it although I think we've isolated it.
Here is something you could try as a workaround. This would also help us understand the problem so if this works then please let us know.
In the file newrelic_rpm/lib/newrelic/agent/agent.rb, change the 'gather_info' method by inserting 'return {}' at the top of the method. We think this method could be the cause of these problems.
1 person says
this solves the problem
-
Inappropriate?Hello,
I am using version 2.5.3.
Thanks for the patch!
I have applied the following change and will see if it happens again:
Index: vendor/plugins/newrelic_rpm/lib/newrelic/agent/agent.rb
===================================================================
--- vendor/plugins/newrelic_rpm/lib/newrelic/agent/agent.rb (revision 23320)
+++ vendor/plugins/newrelic_rpm/lib/newrelic/agent/agent.rb (working copy)
@@ -334,6 +334,7 @@
# Collect the Rails::Info into an associative array as well as the list of plugins
def gather_info
+ return { }
i = []
begin
require 'builtin/rails_info/rails/info'
-
Inappropriate?So far the issue has not reoccurred since our last few mongrel restarts.
But, as I said it appears to be nondeterministic.
If it happens again I will let you know.
Thanks!
I’m thankful
Loading Profile...


EMPLOYEE
EMPLOYEE