PDM Resource Monitor Warnings for GDI Handles

Problem

When using SOLIDWORKS PDM, a type of warning can be displayed: "Warning! Available GDI handles are critically low for the process...". These warnings can happen when logging into the PDM local vault view or using the PDM administration console. This article goes over how to handle these warnings or adjust them.

PDM Resource Monitor Warnings

Most processes that display graphical objects and formatted text in Windows use Graphical Device Interface (GDI) handles. By default, each process has a limit of 10,000 GDI handles. If the process exceeds this limit, the process will become unstable and hang or crash. For example, when opening many Windows Explorer dialog boxes, it is possible that the ‘Explorer.exe’ process will reach 10,000 GDI handles and crash. 

Effective with the release of SOLIDWORKS PDM 2019, the ‘Edmserver.exe’ process (the SOLIDWORKS PDM icon in the system tray) will monitor several processes and display a warning if available GDI handles are getting low. When the monitored process reaches 8500 GDI handles, SOLIDWORKS PDM displays the following warning:
"Warning! Available GDI handles are critically low for the process..."

When the monitored process reaches 9000 GDI handles, the warning changes to a critical warning and displays repeatedly until we reduce the GDI handles to fewer than 9000. When we click on the warning, the following additional text appears: "To avoid Explorer instability, please close additional Explorer windows to free resources or restart the process".

The ‘SOLIDWORKS PDM Resource Monitor’ will display the warning for the following processes: Explorer.exe, ConisioAdmin.exe, Search.exe, CardEdit.exe, FileViewer.exe, and ItemExplorer.exe.

Note: Upgrading to SOLIDWORKS PDM 2021 SP5.0 or higher resolves two GDI Handle Leak issues:

  1. SPR 875195: GDI objects are consistently increasing after open/close multiple files in SOLIDWORKS with PDM Add-In enabled
  2. SPR 1208324: User Interface: explorer.exe GDI handles leak when browsing through PDM folders

Solution 1: Close Windows Explorer

Closing Windows Explorer dialog boxes should release the GDI handles and avoid a crash. Then reopen Windows File Explorer and reopen SOLIDWORKS PDM.

Solution 2: Change the GDI Handle Threshold for Warnings

We can control the GDI handle threshold for when the warnings should display by modifying the registry with the steps below. When going into the Registry Editor, do not modify or delete anything except what is listed below. If you do not feel comfortable performing the steps listed below, please contact Technical Support.

We strongly recommend backing up the Registry before making any changes by following the steps here: How to back up and restore the registry in Windows | Microsoft Support

Follow the steps below to modify the registry:

  1. Close all applications, including SOLIDWORKS and PDM
  2. Open Windows Search, search for REGEDIT, and then hit Enter to open the Registry Editor

    Open the Registry Editor
  3. Navigate to: HKEY_CURRENT_USER\Software\Solidworks\Applications\PDMWorks Enterprise\Vaults\_-Global\Settings

    Navigate to PDM Registry
  4. Create a DWORD value with the following names in steps 5-7 by right-clicking on the Settings folder to select New > DWORD

    New DWORD
  5. GDI_Danger_Threshold: Number of GDI handles for a Danger warning to display
  6. GDI_Warning_Threshold: Number of GDI handles for a Regular warning to display
  7. MonitorGDIFrequency(sec): Frequency to check for GDI handle threshold
  8. Right-click on the new DWORD value to select "Modify.."

    Modify
  9. Set the "Base" type to "Decimal", enter a value, and hit "OK"

    Set DWORD Value.png
  10. Adjust the values as desired to change when the warnings display

    GDI DWORD Registry
  11. Repeat steps 8-10 for each new DWORD
  12. Close the Registry Editor
  13. Open SOLIDWORKS PDM to retest the issue

Increasing the threshold for the warning to display will decrease the number of PDM Resource Warnings for GDI Handles. If a process approaches the GDI limit, it can still hang and crash without seeing these resource warnings.

For additional support, existing customers can submit a ticket or new customers can contact Hawk Ridge Systems.

 

 

 

 

 

 

Was this article helpful?
1 out of 1 found this helpful

Articles in this section

Comments

0 comments

Article is closed for comments.