You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Baoyuantop (via GitHub)" <gi...@apache.org> on 2026/02/28 01:29:52 UTC
Re: [I] perf: Initial configuration takes too long [apisix-ingress-controller]
Baoyuantop commented on issue #2726:
URL: https://github.com/apache/apisix-ingress-controller/issues/2726#issuecomment-3975980280
Hi @martin-schulze-e2m, the 5-minute delay you're observing is caused by a hardcoded readiness check timeout. When the ingress controller starts, it enters a `WaitReady` state to ensure all Kubernetes resources (like ApisixRoutes, Ingresses, etc.) have been processed at least once before it performs the first full configuration sync to APISIX. This is a safety mechanism to prevent pushing incomplete configurations.
This waiting period has a timeout of exactly 5 minutes, which is defined in `internal/provider/apisix/provider.go`:
```go
func (d *apisixProvider) Start(ctx context.Context) error {
d.log.Info("starting provider, waiting for readiness")
d.readier.WaitReady(ctx, 5*time.Minute) // This line causes the 5-minute block
d.log.Info("Ready detected, starting sync loop")
// ...
}
```
In your case, it seems that at least one of the watched resources is not being marked as "ready" by its reconciler within this 5-minute window, causing the WaitReady function to time out. After the timeout, the controller proceeds with the sync, which is why you see the PUT /sync log entry exactly 5 minutes after startup.
While simply changing the timeout might seem like a solution, the core issue is understanding why the initial reconciliation is taking so long for a small number of resources. To move forward, we need to identify which resource is causing the delay.
Could you please help by providing more detailed debug logs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org