High CPU utilization due to hung PowerShell processes on MID server

Scott Oglesby1
Giga Contributor

We are seeing frequent MID server high CPU utilizations due to what appear to be multiple Powershell processes being hung. We are on the London release. What should some of the basic troubleshooting steps be to alleviate this?

1 ACCEPTED SOLUTION

As per your question it might be increasing the threads count please verify the config.xml parameters if any settings available.

You can set the MID Server to use as few as 5 threads without issues. If the MID Server needs more speed, and the host is powerful enough or lightly loaded with other programs, raise the thread setting. The thread limit depends on the hardware and the operating system of the host. You might have to experiment to find the optimal value for your situation. The following general observations may be useful:

  • Most MID Server tasks require file handles to do their job.
    • Windows: On the Windows operating system, file handles are available in a fixed quantity. If you configure too many MID Server threads on a Windows host, the MID Server can consume all the file handles before approaching maximum CPU usage. This situation appears as an Out of file handles error in the MID Server log and indicates that the MID Server is trying to use too many threads.

 

Follow the steps below to change the config.XML file. Alternatively, use the threads.max connection parameter.

Procedure

  1. Open the \agent\config.xml file using any text editor.
  2. Locate the following lines:
    <!-- MID Server Threads --><parameter name="threads.max" value="25"/>
  3. Edit the value. Keep in mind the cautions described above.
  4. Save the record.
  5. Restart the MID Server service.

 

You can check the following link before:

https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/mid-server/task/t_SetMIDServerThreadUse.html

Thanks,

View solution in original post

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

You can follow KB0597571 for mid server performance tuning.

 

Regards,

Sachin

As per your question it might be increasing the threads count please verify the config.xml parameters if any settings available.

You can set the MID Server to use as few as 5 threads without issues. If the MID Server needs more speed, and the host is powerful enough or lightly loaded with other programs, raise the thread setting. The thread limit depends on the hardware and the operating system of the host. You might have to experiment to find the optimal value for your situation. The following general observations may be useful:

  • Most MID Server tasks require file handles to do their job.
    • Windows: On the Windows operating system, file handles are available in a fixed quantity. If you configure too many MID Server threads on a Windows host, the MID Server can consume all the file handles before approaching maximum CPU usage. This situation appears as an Out of file handles error in the MID Server log and indicates that the MID Server is trying to use too many threads.

 

Follow the steps below to change the config.XML file. Alternatively, use the threads.max connection parameter.

Procedure

  1. Open the \agent\config.xml file using any text editor.
  2. Locate the following lines:
    <!-- MID Server Threads --><parameter name="threads.max" value="25"/>
  3. Edit the value. Keep in mind the cautions described above.
  4. Save the record.
  5. Restart the MID Server service.

 

You can check the following link before:

https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/mid-server/task/t_SetMIDServerThreadUse.html

Thanks,

Thanks.