Group-level “Retry timeout” vs AppServer-level “Default time limit”
28 June 2023 01:59 PM
|
|
IntroductionUnderstanding what are the timeout/time-limit configuration options offered by MarkLogic is important when working with queries. There are a set of options that can be configured at group-level and another set of options that can be configured at app-server-level. One can find an extensive list of what those options are and what each option is used for in the documentation (links at the end), but in this article, we will be discussing two of the important timeout configuration options and how they work with each other - Retry timeout and Default time limit. Quick OverviewThe retry-timeout is the time, in seconds, before a MarkLogic Server stops retrying a request whereas the default-time-limit is the default value for any request’s time limit, when otherwise specified.
A deeper diveTo elaborate on that, the "retry timeout" (group-level setting) is the total time the server will spend waiting to retry (not executing the request itself), so if a request fails in one millisecond with a retryable error (and in general a retry happens every 2 secs), we end up retrying roughly 90 times if the retry-timeout value is set to the default value 180 (90*2 secs = 180). The "default-time-limit" (appserver-level setting), on the other hand, is for each retry i.e, for each retry, the request time gets reset to 0 secs with the default-time-limit which means it is supposed to timeout at the end of whatever value the default-time-limit is configured with. However, if the request fails with a retryable error, a retry happens after a wait time of around 2 secs which means the request time gets reset again to 0 secs and will be set to timeout at the end of the default-time-limit. The above behavior is better explained in a sequence of events listed below:
where "retry-timeout" value is the limit for all retry times combined (t1 + t2 +t3) and "default-time-limit" value is the limit for each retry. For instance, if the retry-timeout is 180 secs and the default-time-limit is 120 secs, the request will still retry until the 180sec retry timeout is met because the 120 sec limit is for each retry and wouldn’t affect the retry timeout. However, a single retry (or the original request) will timeout at 120 secs. Further reading | |
|