node-resque icon indicating copy to clipboard operation
node-resque copied to clipboard

Need help with resque and redis memory

Open dmpvost opened this issue 2 years ago • 4 comments

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

  • old worker faster
  • ping list
  • failure
  • stat

What do you recommend? Thank

Thank you Vincent

dmpvost avatar May 02 '22 16:05 dmpvost

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

evantahler avatar May 02 '22 16:05 evantahler

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 !

dmpvost avatar May 02 '22 18:05 dmpvost

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

evantahler avatar May 02 '22 18:05 evantahler

Ok thank, I will look on this option tomorrow,

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

dmpvost avatar May 02 '22 18:05 dmpvost