How to exclude NewRelic RPM pinger from creating useless sessions in database
Asked Answered
H

3

6

I'm using Newrelic for monitoring my rails app status. They ping (GET request I think) our app every 5 minutes. Do you know how to prevent rails from spawning new user session for every request they are making?

Homosexuality answered 29/1, 2012 at 19:38 Comment(5)
I had this problem too, but my solution was just to have a task that ran every day-ish that cleared out sessions more than 5 days old.Fusil
I did the same, but looking for some more clear solution. Maybe something in rack?Homosexuality
Did you consider filtering by IP within a middleware?Pina
But, the reason to use this pinger is to check if application is up, assuming code 200 that homepage returns? I guess I'll try to contact their support.Homosexuality
@Johny: if the middleware is able to answer, it means your app is up.Pina
P
0

Other good answers are already here, but the pinger is documented in full here: https://newrelic.com/docs/alerts/availability-monitoring

Paronomasia answered 29/3, 2013 at 18:45 Comment(0)
H
3

Have it ping something that exists in the public directory.

This won't check to make sure that your app is running, but just that the server is up. Assuming the server is up, then your app should be able to create exceptions and New Relic will catch those.

On a new Rails app, for instance, you could have it ping http://rooturl/images/rails.png as that png is in public/images/ by default.

Handstand answered 30/1, 2012 at 2:19 Comment(0)
S
1

I seem to recall some recent work for specifically this use case -- you might contact New Relic support and see if this has been addressed recently.

Seismography answered 30/1, 2012 at 17:19 Comment(0)
P
0

Other good answers are already here, but the pinger is documented in full here: https://newrelic.com/docs/alerts/availability-monitoring

Paronomasia answered 29/3, 2013 at 18:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.