Determine and run some queries to check the monq_task collection to find causes for slowness. Document the queries here in this ticket for future reference to run again if needed.
Here are a few:
in progress, and pending
db.monq_task.find({state:'busy'}).count() db.monq_task.find({state:'ready'}).count()
raw quantity per day
db.monq_task.find({time_queue: {$gt: ISODate("2011-12-13T00:00:00.000Z"), $lt: ISODate("2011-12-14T00:00:00.000Z")}}).count()
recent tasks that took over 5 minutes
db.monq_task.find({'$where': "this.time_stop.getTime() - this.time_start.getTime() > 5*60*1000", time_stop: {'$ne': null}, time_start: {'$gt': ISODate("2011-12-10T00:00:00.000Z")}}).count()
what is assigned to each process
db.monq_task.find({'state':'busy', time_start: {$gt: new Date(Date.now() - 1000*60*60*48)}}, {process:1,task_name:1,time_start:1}).sort({'process':1})
details of current process
db.monq_task.find({'state':'busy', time_start: {$gt: new Date(Date.now() - 1000*60*60*3)}})
check an individual process activity
> sudo -u allura strace -p 6406 > kill -USR1 -p 6406 # need siteops to run; will print current task to /var/log/allura/allura.log
types of pending tasks
db.monq_task.distinct('task_name', {'state':'ready'}) q = {'state':'ready'} db.monq_task.distinct('task_name', q).forEach(function(t){ print(t, db.monq_task.find({$and: [q, {task_name:t}]}).count()) })
Not as urgent, since the immediate problem was found in the mail notification task and fixed.
Originally by: scoop
Find high occurrences of certain tools/projects within a task type
Last edit: Dave Brondsema 2017-03-14
Find average time to complete certain tasks:
Count tasks by state: