Nothing like a Smashing Pumpkins reference, right? I’ve spent all day yesterday and today at this silly Ruby memory leak issue, trying to determine the cause and fix it for the Library. I’ve got a pretty strong feeling the leak has something to do with threading, but of course, that’s one of the harder things to debug in computers.
For the technical-minded: the leak only occurs in the health check endpoints, and only when OkComputer.check_in_parallel = true. This causes each check to run in its own thread; the checks that cause leaks are ones that use Timeout.timeout, and the leaked objects are of class Fiber, which makes me think the issue is that some of the sync variables used by the timeout gem aren’t being released properly.
I’ve been actually working quite late into the evenings on this, partially to keep myself busy, and partially because it’s such a fascinating issue to debug. Unfortunately, that means my creativity projects are suffering a bit.
Hopefully that will change soon.