Changing web container thread pool acquisition parameters

pull/246/head
chen.ma 3 years ago
parent 02a4cd96f4
commit fee33e4dd1

@ -123,12 +123,9 @@ public class TomcatWebThreadPoolHandler extends AbstractWebThreadPoolService {
tomcatExecutor.setMaximumPoolSize(threadPoolParameterInfo.getMaximumPoolSize()); tomcatExecutor.setMaximumPoolSize(threadPoolParameterInfo.getMaximumPoolSize());
tomcatExecutor.setKeepAliveTime(threadPoolParameterInfo.getKeepAliveTime(), TimeUnit.SECONDS); tomcatExecutor.setKeepAliveTime(threadPoolParameterInfo.getKeepAliveTime(), TimeUnit.SECONDS);
log.info( log.info(
"[TOMCAT] Changed web thread pool. " + "[TOMCAT] Changed web thread pool. corePoolSize :: [{}], maximumPoolSize :: [{}], keepAliveTime :: [{}]",
"\n corePoolSize :: [{}]" + String.format(CHANGE_DELIMITER, originalCoreSize, threadPoolParameterInfo.getCorePoolSize()),
"\n maximumPoolSize :: [{}]" + String.format(CHANGE_DELIMITER, originalMaximumPoolSize, threadPoolParameterInfo.getMaximumPoolSize()),
"\n keepAliveTime :: [{}]",
String.format(CHANGE_DELIMITER, originalCoreSize, threadPoolParameterInfo.getCoreSize()),
String.format(CHANGE_DELIMITER, originalMaximumPoolSize, threadPoolParameterInfo.getMaxSize()),
String.format(CHANGE_DELIMITER, originalKeepAliveTime, threadPoolParameterInfo.getKeepAliveTime())); String.format(CHANGE_DELIMITER, originalKeepAliveTime, threadPoolParameterInfo.getKeepAliveTime()));
} catch (Exception ex) { } catch (Exception ex) {
log.error("Failed to modify the Tomcat thread pool parameter.", ex); log.error("Failed to modify the Tomcat thread pool parameter.", ex);

Loading…
Cancel
Save