Spring Boot - Limit on number of connections created

后端 未结 5 1149
轮回少年
轮回少年 2020-12-12 23:43

I developed a microservice using Spring Boot. I was performance testing the service by stubbing the backend calls. When I looked at the thread count , I see that the maximu

5条回答
  •  有刺的猬
    2020-12-13 00:19

    Maybe, you can have a look at the springboot's config

    server.tomcat.accept-count=100 # Maximum queue length for incoming connection requests when all possible request processing threads are in use.
    server.tomcat.additional-tld-skip-patterns= # Comma-separated list of additional patterns that match jars to ignore for TLD scanning.
    server.tomcat.background-processor-delay=10s # Delay between the invocation of backgroundProcess methods. If a duration suffix is not specified, seconds will be used.
    server.tomcat.basedir= # Tomcat base directory. If not specified, a temporary directory is used.
    server.tomcat.max-connections=10000 # Maximum number of connections that the server accepts and processes at any given time.
    server.tomcat.max-http-header-size=0 # Maximum size in bytes of the HTTP message header.
    server.tomcat.max-http-post-size=2097152 # Maximum size in bytes of the HTTP post content.
    server.tomcat.max-threads=200 # Maximum amount of worker threads.
    server.tomcat.min-spare-threads=10 # Minimum amount of worker threads.
    server.tomcat.port-header=X-Forwarded-Port # Name of the HTTP header used to override the original port value.
    server.tomcat.protocol-header= # Header that holds the incoming protocol, usually named "X-Forwarded-Proto".
    server.tomcat.protocol-header-https-value=https # Value of the protocol header indicating whether the incoming request uses SSL.
    server.tomcat.redirect-context-root=true # Whether requests to the context root should be redirected by appending a / to the path.
    server.tomcat.remote-ip-header= # Name of the HTTP header from which the remote IP is extracted. For instance, `X-FORWARDED-FOR`.
    server.tomcat.resource.cache-ttl= # Time-to-live of the static resource cache.
    server.tomcat.uri-encoding=UTF-8 # Character encoding to use to decode the URI.
    server.tomcat.use-relative-redirects= # Whether HTTP 1.1 and later location headers generated by a call to sendRedirect will use relative or absolute redirects.
    
    

提交回复
热议问题