【问题标题】:SpringBoot connecion timeoutSpring Boot 连接超时
【发布时间】:2021-09-28 10:02:39
【问题描述】:

我是这样配置的:

server:
  port: 8080
  servlet:
    context-path: /user
  tomcat:
    connection-timeout: 3s
    threads:
      max: 1 
      min-spare: 1 
    accept-count: 1
    max-connections: 1

但是当我尝试使用 Jmeter 时, 在等待 50 秒后,连接不会立即断开。

【问题讨论】:

    标签: java spring-mvc


    【解决方案1】:

    试试这个吧:

    server.servlet.session.timeout=60s
    

    在您的情况下,Tomcat 不允许将超时设置为小于 60 秒:https://github.com/spring-projects/spring-boot/issues/7383

    【讨论】:

    猜你喜欢
    • 2017-08-01
    • 2020-11-27
    • 1970-01-01
    • 2021-12-27
    • 1970-01-01
    • 2021-07-11
    • 2018-12-03
    • 2020-10-27
    • 1970-01-01
    相关资源
    最近更新 更多