Starting MidPoint With Task Scheduler Stopped

Last modified 22 Apr 2021 17:31 +02:00

Imagine that you have a runaway task that starts on midPoint startup and quickly consumes all the available resources (or prevents normal functioning of midPoint in any other way). Since 3.6 it is possible to start midPoint with task scheduler simply stopped, so you can easily inspect the tasks and delete or suspend the troublemaker.

There are two methods:

Safe mode

Setting safe mode in config.xml
<configuration>
    <midpoint>
        ...
        <safeMode>true</safeMode>
    </midpoint>
</configuration>

Setting safe mode currently causes the following:

  1. Suppresses the start of task scheduler at startup.

  2. Sets 'tolerate undeclared prefixes' to true, allowing some misconfigurations to be manually corrected.

More similar effects are to be expected in the future.

Using schedulerInitiallyStopped parameter

This configuration parameter directly makes task scheduler to stay stopped at startup. It can be set like this:

Setting schedulerInitiallyStopped in config.xml
<configuration>
    <midpoint>
        <taskManager>
            <schedulerInitiallyStopped>true</schedulerInitiallyStopped>
            ...
        </taskManager>
    </midpoint>
</configuration>

Starting the scheduler later

In both cases, the scheduler can be simply started manually in the List tasks screen, by clicking on Start action on a given midPoint node.

Or, you could change the config.xml to a normal state, and restart midPoint.