[Ruby] New Relic APM disconnecting from the application after approx 30 min

issue:- After configuration with new relic APM to a ruby application, it is working fine for some time and then,may be after 30 mins it is disconnecting.

So, Again we are doing configuration from top to bottom (apm configuration steps).

Please suggest us to overcome this issue.

Hello @Cloud18

May I ask if you are running the Ruby Agent and your application in a standalone environment, as in its not being hosted in Docker, Kubernetes, ect…

When reviewing either the Application logs or Agent logs, do you notice the agent attempting to reconnect or does it more-so disconnect with no logging?

Yes my application is running in a standalone environment.It disconnects with no logging informtion.Not able to find the root cause why my application is disconnecting after some time.
Getting this issue Signal lost for 10 minutes on ‘Low Application Throughput’ triggered by FACET

Hi @Cloud18

Thank you for the extra context here.

I am unfortunately not familiar enough with Ruby to offer better support, however I am here to help. I have gone ahead a reached out to our Engineering team to have a look at this.

They will reach out with their findings via this post. As usual all updates, questions and any fixes you have are welcomed!

Is your application continualy in use or does it have periods of inactivity? when that inactivty passes can does it reconnect.

We are using Ruby with Rails framework and Nginx webserver and Puma as application server.
We have configured the APM using Ruby agent but it disconnects after sometime and doesn’t reconnect automatically. The application is continuously in use.

Hi @Cloud18

Thanks for reaching back out, the extra context.

To confirm my understanding you use the APM Ruby Agent, and wish to use it not in an intermittent manner.

Would it be possible for you to share a permalink to where you noting the issue, note only New Relics will have access to the link.

Looking forward to hearing from you!

When I check status of newrelic-infra in the server I get
May 19 12:49:29 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-19T12:49:29Z” level=error msg=“processing update for kernel module” error=“Unable
May 19 12:49:29 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-19T12:49:29Z” level=error msg=“processing update for kernel module” error=“Unable
May 20 02:00:31 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-20T02:00:31Z” level=warning msg=”[engine] failed to flush chunk '6934-1653012026.7
May 20 06:53:14 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-20T06:53:14Z” level=error msg=“metric sender can’t process” component=MetricsInges
May 20 06:53:15 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-20T06:53:15Z” level=warning msg=”[engine] failed to flush chunk '6934-1653029594.3
May 20 10:05:07 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-20T10:05:07Z” level=warning msg="[engine] failed to flush chunk '6934-1653041106.9
May 21 01:23:07 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-21T01:23:07Z” level=warning msg="[engine] failed to flush chunk '6934-1653096181.3
May 23 09:03:39 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-23T09:03:39Z” level=error msg=“metric sender can’t process” component=MetricsInges
May 23 09:29:10 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-23T09:29:10Z” level=warning msg=“commands poll failed” component=CommandChannelSer
May 23 09:29:10 ip-10-0-10-233 newrelic-infra-service[6708]: time=“2022-05-23T09:29:10Z” level=warning msg="[engine] failed to flush chunk '6934-1653298106.8

Is there anything in these errors that’s disconnecting newrelic?

Hi @Cloud18

This is your infra logs not permalink to the APM disconnecting, can provide a link to this please, where you are seeing it occur in the account.

I will loop in engineering while you get the link, as they will likely need to support here, judging by the logs.

Please they will reach out here with via this post with any updates.

Hi @Cloud18

I was curious, are you using the gem newrelic-infinite_tracing, Language agents and distributed tracing | New Relic Documentation? If so, have you tried disabling/removing that gem to see if the agent still disconnects after 30 minutes?

Thanks,