CacheBox creates multiple reap threads if the initial one take longer to complete than the reap frequency


See ticket 1367 where a hung reaping cfthread could cause thousands of extra reaping threads to be created. Look into one of the two ideas:
1) Creating a flag in the object store that keeps track of when reaping starts that the reaping thread sets back when it's finished.
2) A way to check and see if the reaping thread is still running prior to starting a new one. That way if the reap errors our for some reason the app won't just stop reaping forever.


Luis Majano
April 11, 2014, 2:21 AM

i am thinking of deffering this, since we increasedj the default reap frequency. 5 minutes should be more than enough for reaping now.

Brad Wood
April 11, 2014, 5:05 PM

In the past when this was an issue, it was because threads were getting hung-- not necessarily because it actually took a normal reap longer than 2 minutes to run. I think it would actually be a good fail safe. Another thing to consider would be a max reap time, where the reap aborts if it takes too long. Kind of like a "GC overhead limit exceeded" error.

Luis Majano
April 13, 2020, 10:20 PM

This is now resolved to a fixed delay schedule task using cbPromises


Luis Majano


Brad Wood



Fix versions