LearnBoost/kue — Issue #94: memory consumption
Author: bbn
Created: 2012-01-17 00:12:29+00:00
State: open

When a job is complete I remove it from the queue (see code below). After running about 70,000 jobs overnight the redis memory usage is at approx 30MB. There were 18 failed jobs still in the database, and the queue length is currently zero - jobs are processed more quickly than they are queuing. Redis is not being used in any other way.

Any ideas why the redis memory usage keeps increasing even though I'm deleting the completed jobs? Coffeescript code:

gaemodel.update = (params) ->
job = jobs.create "gaemodel-update", params
job.attempts 2
job.save()
job.on "complete", ->
job.remove (err) ->
throw err if err
console.log 'completed job #%d', job.id