Skip to content
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

Connection timeout connecting to collector.eu01.nr-data.net #390

Closed
edds opened this issue Aug 18, 2022 · 12 comments · Fixed by #391
Closed

Connection timeout connecting to collector.eu01.nr-data.net #390

edds opened this issue Aug 18, 2022 · 12 comments · Fixed by #391

Comments

@edds
Copy link
Contributor

edds commented Aug 18, 2022

Describe the bug

I'm seeing the following error in my tmp/new_relic.log

[ERROR] - 2022-08-17 19:34:18 - preconnect: (failed_request) {:failed_connect, [{:to_address, {'collector.eu01.nr-data.net', 443}}, {:inet, [:inet], :timeout}]}

Changing the http timeout in NewRelic.Util.HTTP to 2000ms rather than 1000ms seems to remove the error.

Would you accept a PR to increase, or make configurable the timeout? With the low timeout if the preconnect fails we don't get any transaction tracing at all.

Environment

Both locally and remote on Heroku.

  • Elixir & Erlang version (elixir -v):
Erlang/OTP 24 [erts-12.3.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.13.4 (compiled with Erlang/OTP 24)
  • Agent version (mix deps | grep new_relic_agent):

new_relic_agent 1.27.7

@Cgboal
Copy link

Cgboal commented Aug 19, 2022

I've started getting this also, thanks for the fix

@infinityfye
Copy link

I started getting this today as well on AWS ECS.

@Cgboal
Copy link

Cgboal commented Aug 31, 2022

This is now happening for me even with a 5_000ms timeotu set.

@infinityfye
Copy link

Yeah, on AWS ECS I actually had to raise it all the way to 10_000

@edds
Copy link
Contributor Author

edds commented Aug 31, 2022

For extra context there is a thread on the NewRelic discuss about this issue. Feel free to also let them know there.

@mattbaker
Copy link
Contributor

Whoops, didn't mean to close this one.

I do think we need a better solution that's not opt-in so it's solved for every user, see some of the discussion here.

tl;dr: let's provide a higher timeout just for collector communication and do a scan of the codebase to see if that could conflict with timeouts elsewhere (GenServer calls, for example). If anyone takes it on feel free to tag me

@mattbaker mattbaker reopened this Sep 5, 2022
@mattbaker
Copy link
Contributor

(@edds work in #391 allows for a global increase across the board in the mean time)

@mattbaker
Copy link
Contributor

just published https://hex.pm/packages/new_relic_agent/1.27.8

@ahsandar
Copy link

i am seeing this issue from Linode, Kamatera and Cloudcone as well. Is there any docs on how to increase the timeout in 1.27.8 ?

@infinityfye
Copy link

i am seeing this issue from Linode, Kamatera and Cloudcone as well. Is there any docs on how to increase the timeout in 1.27.8 ?

Nope. Unfortunately, documentation has not been updated yet.

But you can do this in your config:

config :new_relic_agent,
    httpc_request_options: [
      connect_timeout: 13_000 # choose whatever number is suitable for you here
    ],
    ...

@ahsandar
Copy link

Thanks @infinityfye, I have a PR sent for docs update hope that gets merge and is of use to others

@mattbaker
Copy link
Contributor

Closing in favor of #395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants