CP.AI 2.0.7 causing Python CPU spikes + AI timeout

Moderators: HeneryH, TimG

Post Reply
Elprebse
Posts: 40
Joined: Tue Feb 15, 2022 7:45 am
Location: Denmark

CP.AI 2.0.7 causing Python CPU spikes + AI timeout

Post by Elprebse » Mon Feb 06, 2023 11:11 am

Hello forum,

Since moving to CodeProject.ai v2.0.x (from v1.6.x) I am experiencing a significant CPU usage increase.
Every 10 seconds the 'Python' task is jumping the CPU usage to 78-80% for 2-3 seconds, and then it return to 0%. Overall system is at 100% then and unresponsive.
BI service is running steady at 13-17%.
CPU spikes are not caused by BI triggers and subsequent AI analysis. Just automatically every 10 seconds or so.
Removing CP.AI from the system is eliminating the problem.
Manual remove of folders, re-boot, etc. - all that is tried before reinstalling, but once CP.AI is back on the system the problem is also back.

I suspect the above CPU spikes to cause AI: timeout and AI: not responding (15000 ms).
These errors apply to 80% of the triggers and the last 20% are returning results as expected.

Workstation running W11 Pro 22H2 (only doing BI)
CPU: Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz 3.40 GHz
Memory: 32GB

Any suggestions to this and/or can anyone pass me the CP.AI v1.6.8 file to try a rollback?
I struggle to find the older versions to download.
Attachments
Skærmbillede 2023-02-06 114410.png
Skærmbillede 2023-02-06 120914.png
Windows 11 Pro, 64-bit
Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz 3.40 GHz
32GB RAM
Intel(R) HD 4600 Graphics (headless)
2 sites, 9 cameras
PaulDaisy
Posts: 85
Joined: Mon Jan 16, 2023 5:06 pm

Re: CP.AI 2.0.7 causing Python CPU spikes + AI timeout

Post by PaulDaisy » Mon Feb 06, 2023 7:42 pm

Have you tried to look at the CPAI console and see if it is processing something? High Python load is what I observed on my system any time CPAI processed events on v. 1.6.8, causing 1-3 s long, 100% CPU load caused by Python. Adding a CUDA GPU resolved that issue completely for me. If you have CUDA and the problem started after installing CPAI 2.x, maybe you lost the use of the CUDA processor and fell back to CPU?

In any case, the CPAI console will be a good place to start the troubleshooting: http://localhost:32168/
Elprebse
Posts: 40
Joined: Tue Feb 15, 2022 7:45 am
Location: Denmark

Re: CP.AI 2.0.7 causing Python CPU spikes + AI timeout

Post by Elprebse » Tue Feb 07, 2023 10:31 am

I will dive into it. Many thanks.
Currently I might improvements by disabling ALPR. Will test further.
Windows 11 Pro, 64-bit
Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz 3.40 GHz
32GB RAM
Intel(R) HD 4600 Graphics (headless)
2 sites, 9 cameras
Post Reply