Pouria Saleh
Pouria Saleh

Reputation: 55

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 . is there any way to increase http request timeout in order to prevent from connection timeout?

Upvotes: 2

Views: 8181

Answers (1)

xerx593
xerx593

Reputation: 13261

For the "default container" that would be:

server.tomcat.connection-timeout

property.

In this case (JSON body), also:

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" :)

Upvotes: 7

Related Questions