In a node.js app I’m using the kue queueing library, which is backed by redis. When a job is complete I remove it from the queue. 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
In fact the problem was with an older version of node. Upgrading to the 0.6.x chain solved mem consumption problems.