support for resque jobs
Any way to get new relic to monitor my resque jobs?
thx.
-karl
Comments are currently closed for this discussion. You can start a new one.
7 people watching.
-
New Issue
-
Conversation Started
-
The discussion is resolved
No more actions from New Relic or the discussion starter are required.
-
Re-open the discussion Re-open the discussion
Private Permissions
This discussion is private. Only you and New Relic support staff can see and reply to it.
Recent Discussions
| 30 Jul, 2010 04:32 PM | Instrumented 3 DelayedJob servers with NewRelic. 10 instances each. | |
| 30 Jul, 2010 04:11 PM | Is it possible to gain access to the RPM per-minute data by host? | |
| 30 Jul, 2010 02:57 PM | Disabling pointcuts when monitoring background jobs | |
| 29 Jul, 2010 11:57 PM | Any hacks for Rails 3b4 /192 gem (not plugin)? | |
| 29 Jul, 2010 10:19 PM | Which version |
Support Staff 2 Posted by Ralph Bodenner on 01 Mar, 2010 09:20 PM
Hi Karl,
We'll work on an official fix, but for now, here's how one user has gotten Resque working:
http://ononoma.wordpress.com/2010/02/28/newrelic-rpm-with-resque/
Ralph
3 Posted by karl.baum on 01 Mar, 2010 09:41 PM
I saw that today. Any idea on when rpm/resque compatibility will be
ready?
Support Staff 4 Posted by Bill Kayser on 02 Mar, 2010 02:02 AM
I can incorporate the workaround into the agent in a release later this week, but more general (less hacky) support is not likely to be available until the 2.11 release.
Bill Kayser resolved this discussion on 02 Mar, 2010 02:02 AM.
karl.baum re-opened this discussion on 02 Mar, 2010 11:22 AM
5 Posted by karl.baum on 02 Mar, 2010 11:22 AM
Sounds great. Thx!
6 Posted by karl.baum on 02 Mar, 2010 11:35 AM
I've tried to incorporate the changes from the blog you mentioned, but nothing is appearing in newrelic.
And these changes in rpm:
And my method has run 8 times, but I see nothing in newrelic:
https://rpm.newrelic.com/v2/accounts/6119/applications/86848
Any ideas?
thx.
Support Staff 7 Posted by Bill Kayser on 02 Mar, 2010 06:10 PM
Try setting agent_enabled: true in the newrelic.yml and let me know what happens.
Bill
8 Posted by karl.baum on 03 Mar, 2010 02:37 AM
Still don't see any stats in new relic.
thx.
Support Staff 9 Posted by Bill Kayser on 03 Mar, 2010 05:22 PM
I'm looking at the application "Agent Configuration for WeShopNetworkDataExtraction # When 'enabled' is turned on, the agent collects performance data"
Couple of things:
Can you upgrade the agent? You are on an older alpha of the 2.10 release.
Can you fix the application name? Looks like there's a format problem in the yaml file.
It looks like agent_enabled is not set to true in your newrelic.yml. Is that right? If not, how are you setting that value?
Support Staff 10 Posted by Devorah on 15 Mar, 2010 09:38 PM
Karl,
Just wanted to check in and see if you're getting the stats you need now. If not, please try Bill's most recent suggestions and let us know whether or not that helps.
Devorah
11 Posted by mick on 18 Mar, 2010 11:33 PM
Any news on when this will be officially supported?
Support Staff 12 Posted by Bill Kayser on 18 Mar, 2010 11:40 PM
I'm working on it. There are a number of issues we had to address, not just with resque but with delayed job and rake task monitoring. I'm hoping to release a beta early next week. Sorry for the delay.
13 Posted by mick on 18 Mar, 2010 11:51 PM
Sending the data out to RPM after each job sounds like a bad idea. Resque was built for supporting very long queues of small fast jobs. This would slow down these small jobs quite a bit, if they had to wait for the RPM agent to submit the data. It would probably also put a high load on the RPM servers.
Support Staff 14 Posted by Bill Kayser on 19 Mar, 2010 01:01 AM
That's all true, but each job is forked right? We don't really have much choice. If we don't send it right after the job finishes then the process exits and we lose any data we've collected.
I guess I'd have to agree with you. If you're using resque with small jobs, then using RPM to monitor it is probably not a good idea--for you or us. I guess I envisioned resque would have been used for longer running jobs, that being a motivation to run the job asynchronously to begin with. But I can see where that may not always be the case.
I welcome further thoughts.
15 Posted by mick on 19 Mar, 2010 03:01 PM
Some of our jobs run for half a second or even as long a a second. Is that a long running job? I don't know, but it is absolutely a long time executing this stuff in the rails request, so there is plenty of motivation. We are soon going to execute hundreds of these jobs every minute, which resque is really good for.
Here is an idea:
We know that we have an instance of redis at hand so we use that as a communications layer between the master/parent resque process and the forked/child processes. Resque has an after_fork hook, so where we patch the forked instance of the RPM agent to store the collected RPM data in redis. We patch the RPM agent running in the mater/parent resque process to pick up tha RPM data from resque, and send it to RPM every minute. This could maybe be done in the before_first_fork hook.
Support Staff 16 Posted by Bill Kayser on 21 Mar, 2010 12:20 AM
Mick if I understand your suggestion, you are proposing that when the forked job is done performing, it flushes the metric data, transaction traces and errors into redis. Then, once a minute the master process could pull the data out of redis and send it to RPM.
I think this is feasible but it sounds pretty ambitious. You'd have to harvest the data like normal, but instead of sending it to RPM you would serialize it and store it in Redis. In the master process you'd have to add the ability to pull the metric data out of the external source (redis) and combine it with what's in memory. In the end what you'd save is the difference between a post to a remote server and a 'post' of data to redis. I'm afraid it's not really a configuration we could support reliably even if we wanted to invest the time into that kind of enhancement.
If you did want to take a crack at forking the agent and rpm_contrib gems and working on this, I'd be happy to advise you.
Wish I had better advice for you.
17 Posted by mick on 21 Mar, 2010 12:35 AM
I'm absolutely going to try implementing my solution, so a few pointers would be much appreciated.
Thanks
Support Staff 18 Posted by Bill Kayser on 21 Mar, 2010 03:26 PM
Sure, I'll send you some pointers.
Bill Kayser resolved this discussion on 03 Apr, 2010 01:53 AM.