The worker thread pool is used to centrally manage threads used internally by X4 BPMS, for example, through adapters and the Scheduler. To use the worker thread pool, a configuration file is required that is loaded at server startup.
To create the configuration file
-
Open an editor, such as Notepad++.
-
Create a new file with the following content.
XML<Configuration> <CorePoolSize></CorePoolSize> <MaximumQueueSize></MaximumQueueSize> <MaximumPoolSize></MaximumPoolSize> <KeepAliveTime></KeepAliveTime> <KeepAliveTimeUnit></KeepAliveTimeUnit> </Configuration> -
Name the file
platform-worker-thread-pool.xmland save it to the<server_directory>/configurations/platform-worker-thread-pool.xmldirectory.
Note:
If this file does not exist in the configurations folder, X4 BPMS will revert to the default values:
<Configuration>
<CorePoolSize>10</CorePoolSize>
<MaximumQueueSize>100</MaximumQueueSize>
<MaximumPoolSize>100</MaximumPoolSize>
<KeepAliveTime>60</KeepAliveTime>
<KeepAliveTimeUnit>SECONDS</KeepAliveTimeUnit>
</Configuration>
The following elements are included in the configuration file:
|
Element |
Description |
|---|---|
|
|
Root element of the configuration file |
|
|
Number of threads that always exist in the pool Possible values:
|
|
|
Maximum number of threads in the queue Possible values:
|
|
|
Maximum number of threads in the pool Possible values:
|
|
|
Idle duration for threads outside Possible values:
|
|
|
Time unit of idle duration for threads outside Possible values:
|
Recommendations for customization
-
Increase the
MaximumPoolSizevalue if many processes are started at the same time or are running longer. -
Make sure that you have sufficient RAM allocated to the JVM, as more threads require more memory.
-
If a
RejectedExecutionExceptionappears in the log, this indicates that the pool or queue size is too small. Adjust the values accordingly.