actionhero / node-resque

Node.js Background jobs backed by redis.
https://node-resque.actionherojs.com
Apache License 2.0
1.37k stars 151 forks source link

Need help with resque and redis memory #795

Closed dmpvost closed 1 year ago

dmpvost commented 2 years ago

Hi everybody!

I have some trouble with my configuration

I have explore my redis database, and the folder resque if growing fast.

I'm putting a new app in production soon, and it's a problem :/

What the best way to flush

What do you recommend? Thank

Thank you Vincent

evantahler commented 2 years ago

You can do all of that via the redis CLI and the del command. Are you looking for help with something specific?

dmpvost commented 2 years ago

yes!

there is a option for set a time to live? so data are auto delete?

there is some function that help to manage?

thank you @evantahler !

evantahler commented 2 years ago

Old workers and stats should be auto-managed, and you can run queue.cleanOldWorkers() as needed. Perhaps the most interesting item on your list is the failed jobs - We have some utilites here https://github.com/actionhero/node-resque#failed-job-management to help, but maybe you are asking for something more blunt?

A cool PR for you to add might be a method like queue.removeFailedOlderThan(timestamp<number>, queue<string-optional>) - remove all failed jobs older than a certain date

dmpvost commented 2 years ago

Ok thank, I will look on this option tomorrow,

Yes definitely, be able to delete task older than look a great solution