简体   繁体   English

在 spring 启动中增加 HTTP 请求连接超时

[英]increase HTTP request connection timeout in spring boot

I'm going to send an array of about 5 millions of records in json format in my spring boot app.我将在我的 spring 启动应用程序中发送大约 500 万条 json 格式的记录数组。 is there any way to increase http request timeout in order to prevent from connection timeout?有什么方法可以增加 http 请求超时以防止连接超时?

For the "default container" that would be:对于“默认容器”,它将是:

server.tomcat.connection-timeout

property. 属性。

In this case (JSON body), also:在这种情况下(JSON 正文),还有:

server.tomcat.max-swallow-size

sounds important.听起来很重要。

Also relevant:也相关:

server.tomcat.keep-alive-timeout
// Time to wait for another HTTP request before the connection is closed. When not set the connectionTimeout is used. When set to -1 there will be no timeout.

and maybe:有可能:

server.tomcat.max-connections

And:和:

server.tomcat.max-keep-alive-requests

For other/reactive containers best: search the linked site for "timeout":)对于其他/反应性容器最好:在链接站点中搜索“超时”:)

Too large data.It is more appropriate to transfer data in batches.数据太大,分批传输数据比较合适。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM