【Azure Container Apps】Readiness Probe 配置了 15 秒,为什么日志里仍显示 1 秒超时?
问题描述在排查 Container App 副本异常变化的时间点时在系统日志中看到与 Readiness Probe 失败相关的事件。日志信息为Probe of readiness failed with timeout in 1 seconds.现场配置里TimeoutSeconds已设置为 15 秒但日志中仍出现timeout in 1 second看起来与配置不一致。问题解答结合日志和 GitHub 上的同类问题这类现象大概率与 Consumption 类型下的探针参数限制有关在 Consumption 模式下TimeoutSeconds 不能大于 PeriodSeconds。当配置不满足该约束时在Container App的门户上看到的配置值不一定代表运行时最终生效的探针参数日志里可能表现为未按预期 timeout 生效例如仍显示 timeout in 1 second。GitHub 上也有类似讨论提到 Consumption 模式下存在这个限制。Looks like this is a current consumption limitation I wasnt aware of. If the app is on consumption plan, thenTimeoutSecondscant be greater thanPeriodSeconds. Im following up with the runtime team there, but the only workaround I can tell is to set bothPeriodSecondsandPeriodSecondsto 11 seconds.Link: Health probe timeout not getting picked up · Issue #1580 · microsoft/azure-container-apps · GitHub因此正确的处理方式是将PeriodSeconds与TimeoutSeconds设为相同值或者至少确保TimeoutSeconds PeriodSeconds当在复杂的环境中面临问题格物之道需浊而静之徐清安以动之徐生。 云中恰是如此!