-
Couldn't load subscription status.
- Fork 41.6k
Description
The current Tomcat configuration properties (server.tomcat.threads.min-spare, server.tomcat.max-connections, etc.) apply to both the main application and the actuator.
Depending on your specific configuration this can lead to some waste, for example, you can end up with many threads in the actuator which are unnecessary (even if idle). Would it make sense to allow configuring them individually via properties? Or is this a use case for programmatic configuration?
I've also tried to configure the connectors programmatically with
@Component
public class TomcatConfiguration implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> {
@Override
public void customize(TomcatServletWebServerFactory factory) {
factory.addConnectorCustomizers(new TomcatConnectorConfiguration());
}
public static class TomcatConnectorConfiguration implements TomcatConnectorCustomizer {
@Override
public void customize(Connector connector) {
// do stuff
}
}
}
however, TomcatConnectorConfiguration.customize() is not being called for the actuator's connector. Perhaps the actuator is not using another connector?