Closed Miguel-99 closed 1 month ago
We generally try to align our defaults with those of the underlying technology. In this case, that means an infinite timeout. We have documented a recommendation to configure custom timeouts:
In particular, certain default timeout values are infinite, and you may want to change that to avoid having a thread blocked by an unresponsive mail server
Description
i encountered an issue when using spring-boot-starter-mail dependency. When the smtp client fails to connect to the configured host and port, it enters an infinite reconnection state impacting on MailHealthIndicator becoming stuck attempting to resolve the connection. This causes the /actuator/health endpoint to hang and never return a response
if monitoring tools or services are evaluationg /actuator/health endpoint, they may not indicate an HTTP status error but instead report a timeout. This makes it difficult to identify the real cause of failure
Steps to reproduce:
Expected behaviour:
Fail after a certain default time with an error message
Actual behaviour:
Suggestion:
provide a default timeout configuration that prevents the app from getting stuck in an infinite reconnection state
Environment:
Hi, this is my first issue, hope its well structured.