-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clair high cpu load 24/7 #415
Comments
Did you recently upgrade from 1.x to 2.x? How are you using the API? Quay Enterprise? |
I started from clean 2.0.0. I have coded custom integration which is located between docker registry and clair. I am calling clair using these API specs https://coreos.com/clair/docs/latest/api_v1.html |
The update worker might just keep trying to update then failing and repeating due to the error you posted in #414. Is the CPU usage the same if there are no API requests at all? |
This is exactly what is happening to me. Typically the ubuntu update or the NVD downloads often timeout which sends the updater into a never ending retry cycle. Running the latest v2.0.0 docker container in a K8s setup
Example of incomplete NVD downloads.
|
its possible mine is related to this. I'm playing with my cpu and mem requests and limits. Will post if i can find a sweet spot. |
changing the CPU and memory limits on the container allowed the ubuntu to finish finally and NVD got much further but still failed.
|
how I can disable this ubuntu thing? We do not have any ubuntu based images. |
You'd have to recompile Clair without the import for the ubuntu extension. I'd recommend building off of one of the stable release branches (release-1.x or release-2.x). I've also created a PR for the loop eating the CPU. |
This change makes the updater sleep for a small portion of time before it continues to try and obtain a lock for running the updates. This will prevent the CPU from being pinned in the case where an error is consistently failing an update. Fixes quay#415.
this might be related to #414 but I am wondering why clair cpu usage is all what it can get all the time? Is it really doing something 24/7 if not new images are uploaded?
It might be that 0.2cpu is too low for clair anyway.
The text was updated successfully, but these errors were encountered: