Skip to content

Commit 7b4ea39

Browse files
committed
Default to no http read timeout (#27879)
Elasticsearch offers a number of http requests that can take a while to execute. In #27713 we introduced an http read timeout that defaulted to 30 seconds. This means that if no reads happened for 30 seconds (even after a request is received), the connection would be closed due to timeout. This commit disables the read timeout by default to allow us to evaluate the impact of read timeouts and to avoid introducing distruptive behavior.
1 parent f3978fb commit 7b4ea39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/java/org/elasticsearch/http/HttpTransportSettings.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ public final class HttpTransportSettings {
9595
public static final Setting<Boolean> SETTING_HTTP_RESET_COOKIES =
9696
Setting.boolSetting("http.reset_cookies", false, Property.NodeScope);
9797

98+
// A default of 0 means that by default there is no read timeout
9899
public static final Setting<TimeValue> SETTING_HTTP_READ_TIMEOUT =
99-
Setting.timeSetting("http.read_timeout", new TimeValue(30, TimeUnit.SECONDS), new TimeValue(0), Property.NodeScope);
100+
Setting.timeSetting("http.read_timeout", new TimeValue(0), new TimeValue(0), Property.NodeScope);
100101

101102
public static final Setting<Boolean> SETTING_HTTP_TCP_NO_DELAY =
102103
boolSetting("http.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope);

0 commit comments

Comments
 (0)