Memory Leak when enabling CodeProject.AI
Posted: Thu Dec 21, 2023 4:40 pm
After several years of running Sighthound because of its rather solid AI-based object recognition, I decided to move to Blue Iris in combination with CodeProject.AI. So far I'm okay with the results (still working on tweaking the AI part). However I discovered that my system was suffering from a memory leak. After doing several tests, it turned out that either CodeProject.AI, or the combination of CodeProject.AI and Blue Iris is causing the memory leak. With CodeProject.AI enabled, memory usage will start around 40 % and in the course of a day or two this will creep up to 95-99 %, grinding the system to a halt. By disabling AI (disabling CodeProject.AI service, disabling all AI-related items from the Blue Iris setup), memory consumption remains steady at around 36 %. The weird thing is that none of the Windows memory metrics (Memory - active private working set, Commit size, ...) indicate anything near the suggested percentage of excessive memory usage when AI is enabled. Both Blue Iris and CodeProject.AI (including Python) will take up around 1 GB each.
I could schedule a daily reboot of the laptop as a workaround, but of course the root cause needs to be addressed. For now, I've simply disabled CodeProject.AI and am relying on Blue Iris's default motion detection (which seems to work okay).
I'm running Windows 11 Pro on a Lenovo LOQ 15APH8 laptop with 16 GB of RAM, an AMD 7840HS and an RTX 4060. In the BIOS I've selected 'Discrete graphics only' to make sure the RTX 4060 is used at all times.
Blue Iris version is 5.8.2.2 and CodeProject.AI version is 2.3.4.
Anyone else having similar issues regarding the memory leak and can anyone confirm whether it's CodeProject.AI and/or the combination with Blue Iris that is causing it?
Cheers
I could schedule a daily reboot of the laptop as a workaround, but of course the root cause needs to be addressed. For now, I've simply disabled CodeProject.AI and am relying on Blue Iris's default motion detection (which seems to work okay).
I'm running Windows 11 Pro on a Lenovo LOQ 15APH8 laptop with 16 GB of RAM, an AMD 7840HS and an RTX 4060. In the BIOS I've selected 'Discrete graphics only' to make sure the RTX 4060 is used at all times.
Blue Iris version is 5.8.2.2 and CodeProject.AI version is 2.3.4.
Anyone else having similar issues regarding the memory leak and can anyone confirm whether it's CodeProject.AI and/or the combination with Blue Iris that is causing it?
Cheers