Search code examples
marklogicml-gradle

How to configuring Taskserver 'max time limit' in MarkLogic Deployment Using mlgradle?


I'm working with mlgradle to deploy my MarkLogic application, and I'm trying to increase the 'max time limit' value for taskserver. However, I'm struggling to find a way to configure this via Gradle. Can someone guide me on how to achieve this? Thanks!


Solution

  • The max-time-limit is configured on the appserver, and the TaskServer is just a specialized appserver.

    The taskserver configs live under: /src/main/ml-config/task-servers/ The appserver configs live under: /src/main/ml-config/servers/

    In your TaskServer or appserver config file create an entry with the desired value. For a JSON file it would be something like:

    "max-time-limit": 10800,
    

    and for an XML config it would look like:

    <max-time-limit>10800</max-time-limit>
    

    If you take a look at any of the TaskServer or appserver configs through the Manage API, you can get an idea of what the fields are and the format in either JSON or XML:

    For instance:

    http://localhost:8002/manage/v2/task-servers/TaskServer/properties?group-id=Default&format=json http://localhost:8002/manage/v2/servers/Admin/properties?group-id=Default&format=xml http://localhost:8002/manage/v2/servers/Admin/properties?group-id=Default&format=json