-
Notifications
You must be signed in to change notification settings - Fork 861
Rename evaluationTimeout to timeoutMs #3508
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
base: master
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -930,7 +930,7 @@ The following table describes the various YAML configuration options that Gremli | |
| |gremlinPool |The number of "Gremlin" threads available to execute actual scripts in a `ScriptEngine`. This pool represents the workers available to handle blocking operations in Gremlin Server. When set to `0`, Gremlin Server will use the value provided by `Runtime.availableProcessors()`. |0 | ||
| |host |The name of the host to bind the server to. |localhost | ||
| |idleConnectionTimeout |Time in milliseconds that the server will allow a channel to not receive requests from a client before it automatically closes. If enabled, the value provided should typically exceed the amount of time given to `keepAliveInterval`. Note that while this value is to be provided as milliseconds it will resolve to second precision. Set this value to `0` to disable this feature. |0 | ||
| |idleTransactionTimeout |Time in milliseconds that a transaction can remain idle (no operation running or queued) before the server forcibly rolls it back and removes it. The idle timer is suspended while an operation is running, so a long-running operation does not trip it (its duration is instead bounded by `evaluationTimeout`); the timer is armed only once the transaction returns to idle. Set to `0` to disable idle reclamation. |60000 | ||
| |idleTransactionTimeout |Time in milliseconds that a transaction can remain idle (no operation running or queued) before the server forcibly rolls it back and removes it. The idle timer is suspended while an operation is running, so a long-running operation does not trip it (its duration is instead bounded by `timeoutMs`); the timer is armed only once the transaction returns to idle. Set to `0` to disable idle reclamation. |60000 | ||
| |keepAliveInterval |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the `idleConnectionTimeout` and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleConnectionTimeout`. Note that while this value is to be provided as milliseconds it will resolve to second precision. Set this value to `0` to disable this feature. |0 | ||
|
kenhuuu marked this conversation as resolved.
|
||
| |maxAccumulationBufferComponents |Maximum number of request components that can be aggregated for a message. |1024 | ||
| |maxChunkSize |The maximum length of the content or each chunk. If the content length exceeds this value, the transfer encoding of the decoded request will be converted to 'chunked' and the content will be split into multiple `HttpContent` objects. If the transfer encoding of the HTTP request is 'chunked' already, each chunk will be split into smaller chunks if the length of the chunk exceeds this value. |8192 | ||
|
|
@@ -969,7 +969,6 @@ The following table describes the various YAML configuration options that Gremli | |
| |lifecycleHooks |A `List` of Java-based `LifeCycleHook` implementations to instantiate and execute during server startup and shutdown. See <<server-lifecycle-hooks>>. |_none_ | ||
| |lifecycleHooks[X].className |The fully qualified class name of the `LifeCycleHook` implementation. |_none_ | ||
| |lifecycleHooks[X].config |A `Map` of configuration passed to the hook's `init(Map)` method. |_none_ | ||
| |evaluationTimeout |The amount of time in milliseconds before a request evaluation and iteration of result times out. This feature can be turned off by setting the value to `0`. |30000 | ||
| |serializers |A `List` of `Map` settings, where each `Map` represents a `MessageSerializer` implementation to use along with its configuration. If this value is not set, then Gremlin Server will configure with GraphSON and GraphBinary but will not register any `ioRegistries` for configured graphs. |_empty_ | ||
| |serializers[X].className |The full class name of the `MessageSerializer` implementation. |_none_ | ||
| |serializers[X].config |A `Map` containing `MessageSerializer` specific configurations. |_none_ | ||
|
|
@@ -985,6 +984,7 @@ The following table describes the various YAML configuration options that Gremli | |
| |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false | ||
| |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 | ||
| |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1 | ||
| |timeoutMs |The maximum amount of time in milliseconds that a request is allowed to execute on the server before it times out. This is the server-wide default and may be overridden on a per-request basis with the `timeoutMs` request argument. This feature can be turned off by setting the value to `0`. |30000 | ||
|
Contributor
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. Maybe this this is documented elsewhere, but a question that comes up often is "when does the timeout apply?" does it start when it hits the server (an queues)? or when it starts to be evaluated for execution as it gets picked up off the queue (on a busy server could add delays)? Not sure of the answer to that on HTTP - is that defined by the server semantics? Perhaps a different issue, but I'd like to not lose that concept if not clearly stated. |
||
| |useEpollEventLoop |Try to use epoll event loops (works only on Linux os) instead of netty NIO. |false | ||
| |writeBufferHighWaterMark | If the number of bytes in the network send buffer exceeds this value then the channel is no longer writeable, accepting no additional writes until buffer is drained and the `writeBufferLowWaterMark` is met. |65536 | ||
| |writeBufferLowWaterMark | Once the number of bytes queued in the network send buffer exceeds the `writeBufferHighWaterMark`, the channel will not become writeable again until the buffer is drained and it drops below this value. |32768 | ||
|
|
@@ -1769,7 +1769,7 @@ continuously: | |
| client = Cluster.build("localhost").port(8182).create().connect() | ||
| ==>org.apache.tinkerpop.gremlin.driver.Client$ClusteredClient@42ff9a77 | ||
| client.submit("while(true) { }") | ||
| org.apache.tinkerpop.gremlin.driver.exception.ResponseException: A timeout occurred during traversal evaluation of [RequestMessage{, fields={bindings={}, language=gremlin-groovy, batchSize=64}, gremlin=while(true) { }}] - consider increasing the limit given to evaluationTimeout | ||
| org.apache.tinkerpop.gremlin.driver.exception.ResponseException: A timeout occurred during traversal evaluation of [RequestMessage{, fields={bindings={}, language=gremlin-groovy, batchSize=64}, gremlin=while(true) { }}] - consider increasing the limit given to timeoutMs (the maximum time in milliseconds a request may execute on the server) | ||
|
|
||
| The `GroovyCompilerGremlinPlugin` has a number of configuration options: | ||
|
|
||
|
|
@@ -1923,11 +1923,11 @@ generally means being measured in the low hundreds of milliseconds and "slow" me | |
| * Requests that are "slow" can really hurt Gremlin Server if they are not properly accounted for. Since these requests | ||
| block a thread until the job is complete or successfully interrupted, lots of long-run requests will eventually consume | ||
| the `gremlinPool` preventing other requests from getting processed from the queue. | ||
| ** To limit the impact of this problem, consider properly setting the `evaluationTimeout` to something "sane". | ||
| ** To limit the impact of this problem, consider properly setting the `timeoutMs` to something "sane". | ||
| In other words, test the traversals being sent to Gremlin Server and determine the maximum time they take to evaluate | ||
| and iterate over results, then set the timeout value accordingly. Also, consider setting a shorter global timeout for | ||
| requests and then use longer per-request timeouts for those specific ones that might execute at a longer rate. | ||
| ** Note that `evaluationTimeout` can only attempt to interrupt the evaluation on timeout. It allows Gremlin | ||
| ** Note that `timeoutMs` can only attempt to interrupt the evaluation on timeout. It allows Gremlin | ||
| Server to "ignore" the result of that evaluation, which means the thread in the `gremlinPool` that did the evaluation | ||
| may still be consumed after the timeout if interruption does not succeed on the thread. | ||
| * When using transactions, the server dedicates resources to maintain transaction state for each open transaction. For | ||
|
|
@@ -2266,13 +2266,13 @@ server forcibly rolls it back. The idle timer is suspended while an operation is | |
| does not trip it; it is armed only once the transaction returns to idle. Set it to `0` to disable idle reclamation. The | ||
| `maxTransactionLifetime` (default 600000ms) is an absolute cap on the total age of a transaction regardless of | ||
|
kenhuuu marked this conversation as resolved.
|
||
| activity. Unlike `idleTransactionTimeout`, it fires even while an operation is running, interrupting it and rolling the | ||
| transaction back. It bounds transaction lifetime and concurrency-slot occupancy absolutely; like `evaluationTimeout`, | ||
| its ability to free the underlying worker thread depends on the operation reaching an interruptible point. Set it to | ||
| transaction back. It bounds transaction lifetime and concurrency-slot occupancy absolutely; like `timeoutMs`, its | ||
| ability to free the underlying worker thread depends on the operation reaching an interruptible point. Set it to | ||
| `0` to disable the cap. Finally, `maxConcurrentTransactions` (default 1000) caps the number of open transactions | ||
| allowed; when the limit is reached, new begin requests are rejected with HTTP 503. | ||
|
|
||
| These compose with the per-operation `evaluationTimeout` (and its per-request `timeoutMs` override) to bound a | ||
| transaction at three independent scopes: a single operation (`evaluationTimeout`), the gaps between operations | ||
| These compose with the per-operation `timeoutMs` (configurable server-wide and overridable per request) to bound a | ||
| transaction at three independent scopes: a single operation (`timeoutMs`), the gaps between operations | ||
| (`idleTransactionTimeout`), and the transaction as a whole (`maxTransactionLifetime`). The defaults keep a transaction | ||
| bounded out of the box; disabling all of them is a deliberate operator choice, and a per-request `timeoutMs` is always | ||
| honored as sent. | ||
|
|
||
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 was wondering what was going to happen with
idleTransactionTimeout(and other timeouts that may still exist) in this PR. Did we now create another inconsistency by moving to theMssuffix? Should all "timeouts" have the suffix so that it all looks the same?