Closed JohanNordlinder closed 4 months ago
At first sight there are two things to investigate:
spring.boot.admin.monitor.default-timeout
is used by timeoutInstanceExchangeFilter
. So if there is a Filter, why do we set the timeout directly in StatusUpdater
? Maybe because of the margin, as far as I understand it should make sure that responses do not overrun each other exactly at the point where the status is changing.StatusUpdateTrigger
to StatusUpdater
? Can there be problems if the timeout is larger than the interval?Hi, we had a look at this again and agreed, that the implementation is correct. It is a bit unintuitive though.
The default-timeout is for all requests from admin to monitored instance.
However, for interval based tasks like statusUpdate there are some more limitations. The timeout cannot be longer than the interval, so the interval is the upper bound for the timeout. We will update the docs to clarify this and maybe also log a warn message when the timeout is larger than the interval.
We have updated the log and added a warn message. It will be shipped in the next release.
Spring Boot Admin Server information
Version: 3.2.2
Spring Boot version: 3.2.3
Configured Security: Default/Off
Webflux or Servlet application: Servlet application
Client information
Spring Boot versions: 3.2.3
Used discovery mechanism: Self registration
Webflux or Servlet application: Servlet application
Description
We're setting
spring.boot.admin.monitor.default-timeout: 61000
but calls to the client times out after9000ms
. It looks like the default timeout value of10000ms
minus a1000ms
margin is used instead.Error:
The margin of
10000ms
is introduced here: https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/StatusUpdater.java#L85.But I suspect the issue might be this line: https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/StatusUpdateTrigger.java#L57.
To me it seems strange that the interval is used as the timeout.
If I change
spring.boot.admin.monitor.status-interval
to some other value than the default of10000ms
, the error message instead reflects that value which confirms that this interval is actually being used as the timeout.