Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

Add script to run queue size monitoring 1x/min #20

Merged
merged 2 commits into from Sep 14, 2015

Conversation

geoff2k
Copy link
Member

@geoff2k geoff2k commented Sep 14, 2015

As part of my investigation of our checkout service's performance, I've found a desire to have finer grained metrics around queue size than the heroku-scheduler based default of once per 10 minutes.

The mechanism used here will emit the queue size metrics and then sleep for a configured number of seconds that defaults to 60. This will avoid the situation describe on the setup page on the wiki, where running this rake task from the heroku scheduler could cause instances of the task to overlap.


while true; do
bundle exec rake monitor:queue_sizes
sleep 60
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this an env var so that it could be overridden, e.g. sleep ${RESQE_BRAIN_MONITOR_QUEUE_SIZE_TIMEOUT-60}? Or is that YAGNI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's easy enough to do, I set it up with a default in @bf2414c. It's not really a timeout though, it's more of a "wait between attempts" -- how do you feel about the var name?

@geoff2k geoff2k force-pushed the task/emit_queue_sizes_more_frequently branch from 3d597f0 to bf2414c Compare September 14, 2015 19:18
geoff2k added a commit that referenced this pull request Sep 14, 2015
…uently

Add script to run queue size monitoring 1x/min
@geoff2k geoff2k merged commit c5bc065 into master Sep 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants