We're updating the issue view to help you get more done. 

Error in RamCache run can turn into CPU hog

Description

I noticed a Lucee server sitting idle an eating an entire CPU core. I traced it down to a thread running from RamCache whose _run() method was throwing an exception. The catch{} block is empty so I don't know what the exception was (you know how much I hate that...) but the issue is that the sleep() calls is AFTER the _run() method means that when the _run() method errors, the thread skips the sleep and the loop going into super speed where it just runs over and over again with no delay. Not cool. Move the sleep FIRST in the loop to protect against the CPU getting eaten up. Also, why aren't we logging errors that happen in this thread? Minimally, set a run time flag and just log the error the first time it happens so it doesn't fill the logs.

Environment

None

Status

Assignee

Michael Offner

Reporter

Brad Wood

Labels

None

Fix versions

Affects versions

5.3.2.41

Priority

New