We are running microservices on spring boot (with embedded tomcat) and spring cloud. It means service discovery, regular health checks and services that are responding to these health checks, ... We have also spring boot admin server for monitoring and we can see that all services are running ok. Currently running only on test environment...
Some of our microservices are called quite rarely (let's assume once per two days) however there are still regular health checks. When REST api of these services is called after so long idle time the first request takes very long time to process. It of course causes opening circuit breakers in request chains and errors... I see this behavior also when calling different endpoints using spring boot admin (Theads list, Metrics).
As a summary I have seen this behavior in calls on spring boot admim metrics, threads info, environment info or calls where database is called using Hikari data source or where aservice tried to send email through smtp server
My questions are: Is it something related to setting of embedded server and its thread pool? Or should I dive deep into other thread pools and connection pools touched by these requests? Any ideas for diagnostics?
Many thanks