Search code examples
spring-boottomcat8

how to modify tomcat8 acceptCount in spring boot


how to modify the tomcat default thread count using spring boot? when i use spring mvc,i can find the tomcat,and modify the in conf/server.xml,then i modify the maxProcessors and acceptCount,but in spring boot i can't do that.

in org.apache.catalina.connector, i can't find the properties.

Solution

  • try to check what everything you can modify via properties: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties

    server.tomcat.max-threads = 0 # number of threads in protocol handler
    

    otherwise you will have to get your hands dirty with programmatic configuration - http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-configure-tomcat by providing your own TomcatEmbeddedServletContainerFactory