-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack Level too deep (SystemStackError) #661
Comments
I'm getting this too, as of ddtrace 0.18. We rolled back to 0.17.3 because all sorts of commands crash, though possibly only in development or test envs because we had it deployed in production for some time. Here's the relevant part of the stack trace
I traced it as far as the If I comment out the part that adds
|
Ahhh okay, thanks for reporting this one. We're going to take a look at this ASAP, likely related to #649. I would recommend a downgrade to |
@EpiFouloux or @tjgrathwell , do you have a snippet of code or a test we can run to reproduce the problem in a test environment? Want to make sure we're fixing this properly. |
@delner I tried making a minimum viable rails app right now (ruby 2.5.1, rails 5.2, postgres, just adding the ddtrace gem) but it didn't seem to exhibit the problem our real app does Since the (I don't think our project actually uses meta_request anymore, so we could remove it, but it's possible other gems also do whatever So the minimum viable case I can reduce it to is:
add this to the gemfile: gem 'ddtrace'
gem 'meta_request' add this to config/initializers/datadog.rb Datadog.configure do |c|
c.tracer enabled: false
c.use :rails
end then do anything that accesses ActiveRecord in development, like |
Okay, maybe he's using the same gem, but maybe instead there's some common thread that's causing incompatibility with other gems as well. I'll give that a shot, thanks @tjgrathwell . Let me know if you find anything else. |
@tjgrathwell Have another question for you... can you try rails/rails#34602 without Part of me suspects that in trying to replicate a future Rails feature, passing an object in the event args instead of a simple serializable value might be causing this. Possibly because This is just a hypothesis though, still need to do more fact finding. |
Okay, this is definitely because we're putting a non-serializable object into the event args. I can confirm this error also occurs with rails/rails#34602 and without Because |
@tjgrathwell and @EpiFouloux , I opened #662, which I've tested against a Rails app in which I recreated this error; the PR appears to fix it. Would you like to give it a shot to confirm it solves your issue? I'll probably put this in a |
Thank you very much @delner and @tjgrathwell for the quick responses and help, I'm sorry I didn't react soon enough to help. I'm trying the |
@delner I upgraded to
But issue is fixed for me, I suggest we wait for @tjgrathwell answer before closing the issue |
Okay, glad to hear that the original issue is fixed. Regarding the connections, it will default to |
@delner Seems to work for me, thanks for the fix! |
Awesome, thanks guys, closing this issue. |
Hi @delner , I am facing a similar issue what has been described above.
However I dont understand the entire solution that you have provided. I have configured my ruby application like this
Here |
@amundra2016 The error you're seeing is likely unrelated. It appears, from what we can tell right now, to come from Net/HTTP throwing timeout errors upon failing to establish a TCP connection to the agent. This could happen for a number of reasons, however, according to https://stackoverflow.com/questions/42036133/ruby-netopentimeout-execution-expired it might be caused by DNS resolution failure (possibly your If you have further questions about this connectivity issue, I would suggest opening a ticket with our support team, as they might be able to help you, and since this problem appears unrelated to this Github issue. |
Hi @delner , thanks for the response, yes that was the problem with it, Using IP or gem suggested in link worked quite nicely. |
Hello, I think I might have suddenly started experiencing a similar issue.
I searched I also have: Datadog.configure do |c|
# This will activate auto-instrumentation for Rails
c.use :rails
# ...
end This issue just started happening today for one random Sidekiq job, and I haven't really changed anything in my Gemfile recently. Maybe it just hit the one code path that caused this infinite loop. |
Hello, this wasn't related to ddtrace! I updated to |
Hello,
I installed the gem
ddtrace
on my rails application and created the config file as the documentation says:config/initializers/datadog-tracer.rb
:Gemfile.lock
extract:If I attempt to access my active record models, event something like
MyObject.count
I receive the following error:If I remove the config file or remove the line in the
do-end
block everything works again.The text was updated successfully, but these errors were encountered: