Skip to content

Memory use by daemons #951

Answered by nolar
hapatrick asked this question in Q&A
Aug 26, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi. Thanks for asking.

Yes, Kopf keeps track of which daemons have actually exited — to not start them again. If that list is deleted, the daemons will be respawned as for a new object. But that memory should be minimal, a few bytes. Here is the list of daemon/handler ids per resource: https://github.com/nolar/kopf/blob/1.35.6/kopf/_core/engines/daemons.py#L416-L429

What could be leaking the memory, is the "live body" object of the resource. It is remembered once the daemon is started, updated on every new event from Kubernetes:

if memory.daemons_memory.live_fresh_body is not None:
memory.daemons_memory.live_…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hapatrick
Comment options

@hapatrick
Comment options

Answer selected by hapatrick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants