Application Controller reconciling apps every 15s - even though timeout.reconcilliation=30m #17165
Closed
2 of 3 tasks
Labels
bug
Something isn't working
Checklist:
argocd version
.Describe the bug
We're monitoring our
argocd-application-controller-0
pod and noticing that it is reconciling Applications much more frequently than we would expect. We use Github Webhooks to trigger updates, and we set thetimeout.reconciliation: 30m
flag to prevent unnecessary work. We have hundreds of applications, so the work adds up quite quickly.In our logs we can see that the reconciliation happens every
15s
across every single application we have. Here's a small snapshot from one particular application:The
comparison expired ...
refresh was valid ... it had been 30m since thestatus.reconciledAt
field on this application had been updated:Before that particular refresh:
After
19:08:28...
I started to dig through the code and based on the
Refreshing app status (controller refresh requested), level (1)
message, I believe we are hitting this part of appcontroller.go that is callingctrl.isRefreshRequested(app.QualifiedName())
. When I read that code though - I don't really understand the goal.argo-cd/controller/appcontroller.go
Lines 844 to 852 in bb1c1ed
The
isRefreshRequested
code seems to determine if theAppName
is in a list of apps that need to be refreshed. If it is, it deletes the app from that list, and then returnstrue
signaling a refresh is required. To sanity check my understanding I went over to goland and wrote up this quick app:When we run it, we get the expected output:
With this understanding, it implies that our
APP-app-APPENV
application is being added to thectrl.refreshRequestedApps
map out of this codepath, and then this codepath is iterating every 15s and determining "oh, i do need to refresh" because the app has been put into the map.For the life of me though, I cannot figure out where else in the code it's being added to the map. This search yields no outside callers that I can find..
Logs
Here's a more complete log:
Version
The text was updated successfully, but these errors were encountered: