none
Reaching Objects limits for GDI Objects or User Objects limits infrequently in very few user environments

    Question

  • Hi

    Our software is written in C# compiled on Framework .Net 4.0.x

    On very rare occasions we see customers almost reaching the default limit of objects set in the two registry keys below in situations where it is almost impossible to reach these limits, i.e. just two windows open. But it seems to depend on the actual user session and it cannot be provoked either. Neither at the customer's or in our development and test environment.

    We have run out of ideas because with all the memory profiling we cannot see any leaks or improvements ourselves.

    It happens also on older Windows versions.

    Are there other partners with similiar issues or experience and/or what could you suggest for further troubleshooting or measures that could be taken?

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota

    and

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota.

    Thanks a lot for your help in advance.

    Regards,

    Benno

    • Moved by DotNet Wang Wednesday, March 23, 2016 7:36 AM
    Friday, March 11, 2016 3:33 PM

Answers

  • Thanks

    So which forum would you recommend to get best results?

    We do not want to raise these limits but to find the reason,i.e. debug realtime at the customer's when, where and why these limits are reached. Because it happens only in rare cases at some customers and we cannot provoke or simulate it in our sandboxes.

    Best regards,

    Benno

    I'd probably try them over here.

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?category=windowsdesktopdev

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Mike Laughlin Wednesday, March 23, 2016 12:42 PM
    • Marked as answer by coolpilot Thursday, March 24, 2016 12:48 PM
    Wednesday, March 23, 2016 12:28 PM
    Moderator

All replies

  • What did you do so far? Usually a memory dump will tell you which objects are leaked. From that you can further drill into the allocation methods to see where they are beeing called from. If you are lucky and you reach the GDI limity you can let your process crash and Windows Error Reporting will dump your process. That could help to get the call stack of the bad allocation with one repro.

    Saturday, March 12, 2016 4:48 PM
  • Hi. Thanks. Acting just on behalf of our development department and not being a programmer myself I have forwared your question to answer to the actual programmer.

    Monday, March 14, 2016 10:56 AM
  • Hi coolpilot,

    Sorry for my late reply.

    How about the problem now?

    >>On very rare occasions we see customers almost reaching the default limit of objects set in the two registry keys below in situations where it is almost impossible to reach these limits

    Based on your description, your case more related to two registry keys. Since this forum that regarding the very core of .NET,Per my understanding, your case more related to TechNet.

    The maximum number of user handles that can be opened per session is usually lower, since it is affected by available memory. There is also a default per-process limit of user handles. To change this limit, set the following registry value: 
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota
    This value can be set to a number between 200 and 18,000.

    Please refer beneath articles for information.
    1. User Objects
    2. Increasing User Handle and GDI Handle Limits

    Pushing the Limits of Windows: USER and GDI Objects – Part 1

    Pushing the Limits of Windows: USER and GDI Objects – Part 2

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, March 18, 2016 6:16 AM
  • Thanks

    So which forum would you recommend to get best results?

    We do not want to raise these limits but to find the reason,i.e. debug realtime at the customer's when, where and why these limits are reached. Because it happens only in rare cases at some customers and we cannot provoke or simulate it in our sandboxes.

    Best regards,

    Benno

    Friday, March 18, 2016 1:59 PM
  • Thanks

    So which forum would you recommend to get best results?

    We do not want to raise these limits but to find the reason,i.e. debug realtime at the customer's when, where and why these limits are reached. Because it happens only in rare cases at some customers and we cannot provoke or simulate it in our sandboxes.

    Best regards,

    Benno

    @Benno

    Thank
    you for visiting the MSDN forum. I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum. Thanks for your understanding.

    Best regards,

    Kristin



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 23, 2016 7:35 AM
  • Thanks

    So which forum would you recommend to get best results?

    We do not want to raise these limits but to find the reason,i.e. debug realtime at the customer's when, where and why these limits are reached. Because it happens only in rare cases at some customers and we cannot provoke or simulate it in our sandboxes.

    Best regards,

    Benno

    I'd probably try them over here.

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?category=windowsdesktopdev

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Mike Laughlin Wednesday, March 23, 2016 12:42 PM
    • Marked as answer by coolpilot Thursday, March 24, 2016 12:48 PM
    Wednesday, March 23, 2016 12:28 PM
    Moderator