2 Replies Latest reply: Mar 5, 2018 6:38 AM by Martin Sandin RSS

    Is there anyway to adjust the ThreadPool in Qlik Sense?

    lisa sun

      Qlik Sense

      All version from 3.1 to November 2017 release.

      When attempting to restart the cluster through the windows services the printing and/or the scheduler will be unable to close in the expected timeframe.  The error 'Unexpected exception occured when posting alive to Master There were not enough free threads in the ThreadPool to complete the operation.' can be found from the scheduler log.


      Current Workaround:

      Force kill the task associated to the PID for the service which will ensure it stops. Upon start of the service it will now function as expected.

      Is there anyway to adjust the threadpool? 

      For my understanding,  ThreadPool is used to maintain multiple threads to process the incoming requests.  Each thread will be associate with the windows process.  The ThreadPool is created for the performance improvement.  But how many threads it should be created, it is also based on how many current tasks and what type of the tasks.  For the task which load heavy data or do complex calculation, the assigned thread will consume resource heavily.  That will impact other tasks performance as well.    If more tasks are requesting to be run but the threads are busy on the big task, then more thread will be required.  I guess this is what happened. 


      In general, we need to monitor the number of threads in the threadpool and the number of concurrent tasks.  Then check the CPU and memory usage.  Accordingly decide how many threads are required.  But I could not find any information on this part.   It can be coded but not sure if this is configurable.  Could anyone please help to confirm?


      Meanwhile for multiple scheduler nodes environment,  it is important to allocate the task to different scheduler nodes to achieve the best performance and avoid the resource shortage.  The frequency of task reload needs to be adjusted if it helps.


      Is there any suggestion?


      Thank you


      Best Regards