Spring Boot - Limit on number of connections created

后端 未结 5 1185
轮回少年
轮回少年 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:29

    While the accepted answer is very useful, I recently experienced what I believe to be the same problem as the original poster. This is the only search result I could find that directly correlated with my experience, so I thought I'd add my solution in case it helps someone.

    In my case, the observed concurrency limit of 20 was imposed by the default setting of 20 for themaxConcurrentStreamExecution property in org.apache.coyote.http2.Http2Protocol.

    If you're experiencing this problem and you're using HTTP/2, there's a good chance that increasing maxConcurrentStreamExecution will help.

    You can find more info in the Tomcat Configuration Reference, which actually states that this should be set to 200 by default (not 20). You can definitely see the default setting of 20 in org.apache.coyote.http2.Http2Protocol, though, so I'm not sure if this is a typo or just something that presents itself differently in the embedded version of Tomcat.

提交回复
热议问题