Bug: StatusUpdater timeout is ignored
Spring Boot Admin Server information
-
Version: 4.0.2
-
Spring Boot version: 4.0.3
-
Configured Security: None
-
Webflux or Servlet application: WebFlux
Client information
Not needed.
Description
Hello.
According to the documentation at https://docs.spring-boot-admin.com/4.0.2/docs/customization/monitoring/custom-health-status/#example-custom-timeout, it should be possible to change the timeout used by the StatusUpdater by simply defining the bean in the context with the wanted timeout.
Too bad that StatusUpdateTrigger changes it to the value interval from IntervalCheck, ignoring therefore the value set previously:
I can confirm it's ignored since I've set it to 30s but then I can still see status events like
{
"data": {
"instance": "c19d849cce89",
"version": 1415,
"type": "STATUS_CHANGED",
"timestamp": "2026-03-12T14:17:50.594Z",
"statusInfo": {
"status": "OFFLINE",
"details": {
"exception": "java.util.concurrent.TimeoutException",
"message": "Did not observe any item or terminal signal within 9000ms in 'log' (and no fallback has been configured)"
},
"outOfService": false,
"restricted": false
},
"key": "c19d849cce89-1415-STATUS_CHANGED-1773325070594",
"date": "2026-03-12T14:17:50.594Z",
"application": "BFP (INT)"
},
"index": 3
}
where 9s is reported instead of 29s.
Hi @SteKoe.
Can we please add a configuration property (e.g.: statusTimeout) under https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/config/AdminServerProperties.java#L91 so that there is no need to redefine the bean in the context for it?
This is just a side request and I can easily open a PR for it. Of course, it doesn't fix the issue reported in here.
Analysis and Proposed Fix
I've investigated this issue and confirmed the bug. Here's a detailed breakdown:
Root Cause
In StatusUpdateTrigger.updateStatus() (line 57), every status check cycle unconditionally calls:
this.statusUpdater.timeout(this.intervalCheck.getInterval())
.updateStatus(instanceId)
StatusUpdater.timeout(Duration) is a mutable setter — it overwrites the internal timeout field and returns this. Since intervalCheck.getInterval() returns the status-check interval (default 10s), any user-configured timeout is silently replaced before updateStatus() executes.
This explains why @cdprete observes TimeoutException at 9000ms despite configuring 30s: the StatusUpdater applies a 1-second margin in getTimeoutWithMargin() (timeout.minusSeconds(1)), so the effective timeout becomes 10s - 1s = 9s — exactly matching the reported error.
Why this is inconsistent
InfoUpdateTrigger.updateInfo() calls this.infoUpdater.updateInfo(instanceId) directly, without overriding any timeout. StatusUpdateTrigger is the only trigger that forcefully resets the updater's timeout on every cycle.
Fix (PR submitted)
- Remove the
timeout()override fromStatusUpdateTrigger.updateStatus()— callstatusUpdater.updateStatus()directly, consistent withInfoUpdateTrigger. - Apply
monitor.defaultTimeoutfromAdminServerPropertieswhen constructing the auto-configuredStatusUpdaterbean inAdminServerAutoConfiguration, so the propertyspring.boot.admin.monitor.default-timeoutis correctly respected.
After this fix:
- Default behavior is unchanged (timeout remains 10s from
defaultTimeoutproperty default). - Custom
StatusUpdaterbeans with user-defined timeouts are now honored, as the documentation states. - The
spring.boot.admin.monitor.default-timeoutproperty correctly applies to status health checks.
PR: #5210
Regarding the side-request for a dedicated
statusTimeoutconfiguration property — that would be a separate enhancement and is not addressed here.
Hello @herley-shaori.
Thanks for the proposed fix. There are 3 open points, though:
default-timeoutshould be used only if no other timeout is specified for thehealthendpoint. SBA allows to configure the timeout on a per-endpoint basis and setup a default one (the one you mentioned) if, for a given endpoint, there is no specific one set.- According to the reply of @ulischulte in https://github.com/codecentric/spring-boot-admin/issues/4516#issuecomment-3143108287,
10sis somehow intentional. Therefore, an agreement with the team needs to be found on how this should indeed behave. - It needs to be properly verified what happens when the timeout applied for updating the status is bigger than the one used by
IntervalCheck.
From my side, I opened the bug report because I was surprised to read in the documentation of version 4.x that this can now be changed given the discussions we had in https://github.com/codecentric/spring-boot-admin/issues/4516.
fixed with #5237
Hi @ulischulte.
I fail to see, in that PR, the difference with the previous 3.x implementation. The timeout gets anyway capped to the interval, which was already the case in version 3.x and which goes against what's said in the SBA docs where it's exactly shown an example on how to increase the timeout to 30s.
So, I think that the approved and released PR brings almost no benefits at all. The only benefit, if you want to call it in this way, I can see is that now you can have a status timeout < interval timeout.
Does it brings really any benefit? I doubt. Does it clarify the misunderstanding in the docs, which was the scope of this ticket? No. Does it make SBA easier to maintain? Not at all. Does it solve my issue in https://github.com/codecentric/spring-boot-admin/issues/4516 or does it make better? No. Even worse, now things can be misconfigured even more (again :)), but without even a warning this time.
Just my 2 cents here ;)
Hello @ulischulte, @SteKoe, @hzpz.
Please open this again. See https://github.com/codecentric/spring-boot-admin/pull/5237#issuecomment-4234038308 for details.