Pulse - How to use alerts/use pulse for thread cancellation
Note: Pulse and Arc leverage the TM1 REST API to initiate thread cancellations or user disconnections. However, it is ultimately TM1 that determines whether a thread can be successfully canceled. Keep in mind that certain threads can’t be cancelled. More details can be found here - Why Pulse can’t always cancel TM1 threads
TM1 thread cancellation
This section describes how TM1 threads can be cancelled from Pulse and important cautions when using this capability.
You can cancel a running TM1 thread directly from Pulse Live Monitor or Session Monitor, by selecting the target thread and using the Cancel Thread action.
Pulse sends a cancel request to TM1 using the TM1 REST API, which instructs the TM1 server to terminate the specified thread.
Thread cancellation is effectively a forceful termination and may impact logging integrity and data consistency. It can be unsafe if the thread is in the middle of writing data or Pulse logs.
Use thread cancellation only when necessary. Prefer to let long-running processes complete when possible, and treat Cancel Thread as a last resort for misbehaving or clearly stuck threads.
If cancelling a thread does not resolve the situation or the TM1 server becomes unstable, the current workaround is to:
Attempt Cancel Thread from Pulse again if the thread is still visible and active.
As a last resort, restart TM1 service to stop threads if you think that is potential for server crash/instance crash.
Using Pulse Alerts to cancel thread:
All MDX queries taking more than N seconds
Specific TI processes that run longer than N seconds
Filter field works like a wildcard “contains” match
The text you enter is interpreted as a wildcard pattern.
Example used in the thread: filter for all MDX queries taking > 60 seconds.
You can target a specific TI by its REST API function signature, e.g.:
api/v1/Process('TI_Name')/tm1.ExecuteWithReturn
Supported wildcard
Only the asterisk
*wildcard is supported and it matches sequences of alphanumeric characters.There is no support for regular expressions.
Examples :
Pattern like
/api/v1/Processes('process*')will match all processes whose names start withprocess.If you use a standard suffix to mark TIs that should never be killed,
api/v1/Processes('*.excludeFromPulseKillThread')
Using tm1.cfg paramter to cancel threads
As a trick, editing a dynamic tm1s.cfg parameter (for example, increase IdleConnectionTimeOutSeconds by +1, 3600 to 3601) triggers TM1’s DynamicConfig thread to refresh configuration and can sometimes clear stuck or commit-wait threads without restarting tm1sd.exe. The DynamicConfig thread typically polls for changes about every ~60 seconds, so the effect may take up to a minute.
MaximumViewSize parameter can used to limit bad practice of browing enormus views.