Loading TOC...

MarkLogic 12 EA 2 Product Documentation
xdmp:set-request-limits

xdmp:set-request-limits(
   $request-limits-map as map:map,
   [$hostID as xs:unsignedLong?],
   [$serverID as xs:unsignedLong?],
   [$requestID as xs:unsignedLong?]
) as empty-sequence()

Summary

Changes multiple meter limits ( elapsed-time/lock-count/read-size ) for an actively running request to the specified value. If you do not supply values for the last three parameters, the function sets multiple meter limits for the current request.

Parameters
request-limits-map Meter limits map.
hostID The ID of the host on which the request is running. Typically, you get the ID of a host by executing code similar to:
    xdmp:host("myhost")
serverID The ID of the App Server in which the request is running.Typically, you get the ID of an App Server by executing code similar to:
    xdmp:server("myAppServer")
requestID The ID of the request. You can access the request IDs in the request elements of the xdmp:server-status output. You get the request ID by executing code similar to:
    xdmp:server-status( xdmp:host("myHost"),
                        xdmp:server("myAppServer") )//*:request-id
    

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-set-request-limits-any or http://marklogic.com/xdmp/privileges/xdmp-set-request-limits-my

Example

xquery version "1.0-ml";

let $map := map:new((
  map:entry("lock-count", 100),
  map:entry("elapsed-time", 10),
  map:entry("read-size", 10000)
))
return xdmp:set-request-limits($map)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.