-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix default timeouts and ignored requestTimeout #6341
Changes from 4 commits
642cf34
86eb9d6
8b54da1
a385245
9143d18
2327204
a0add9b
ae7e529
456a5dc
e3ac70c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ function createProxy(server, method, route, config) { | |
mapUri: mapUri(server), | ||
passThrough: true, | ||
agent: createAgent(server), | ||
xforward: true | ||
xforward: true, | ||
timeout: server.config().get('elasticsearch.requestTimeout') + 100 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason for adding another 100ms to the configured timeout value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had put this in to prevent a race condition and allow the web es client (https://github.com/ich199/kibana/blob/4.x/src/ui/public/es.js) to return/display the correct requestTimeout error before the socket was closed by the Kibana server process. Whether it is actually needed, I'm not sure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The race condition is a valid concern, but honestly, if the request is timing out, I think we should just let it time out and leave it at that. Added any amount of time padding there, there's still no guarantee we're going to see an error, it could still just timeout. |
||
} | ||
}, | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want the default value to be 5 mins. The 30s default seems to be fine for most use cases, and now that the configure value is actually being used, if users need a longer timeout, they can add the
elasticsearch.requestTimeout
value to their config.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put this in so it matched the default value in the kibana.yml config file. Agreed, 5 minutes is probably a bit excessive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, totally missed that. I think that's a typo in the config file, I think we should fix the value in the yml file and leave this value alone personally. The default in the es client is 30 seconds/30000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goat