Open Files Can Cause Kernel to Report INSUFFICIENT_RESOURCES

This article was previously published under Q192409
This article has been archived. It is offered "as is" and will no longer be updated.
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
The problem described in this article is difficult to identify. One way to check for the problem if you suspect you are experiencing it is to calculate the number of files open on the Window NT-based computer, and look at their size. If you have approximately 180 GB of open files that are not being closed continuously or are opened and closed rapidly in a looping condition, you may be experiencing this problem. Also, your programs may be receiving an INSUFFICIENT_RESOURCES error message when attempting to open, create, or extend a file.

This problem is intermittent. If you try the operation again it is possible for it to succeed. This occurs because it is possible to have a program create and close files faster than Windows NT can clean up. When this occurs it is possible for the program to succeed if retried.

One method that can be used to identify the problem is to start Task Manager and click the Performance tab. At the bottom, locate the Kernel Memory section and watch the value for Paged Memory. You may experience the problem when that value reaches approximately 190. If this value goes back down immediately, you should be able to retry the operation that caused the error message and have it succeed if the system has enough resources to fulfill the program's request.
Install the following files and set the following registry entry.

To resolve this problem, obtain the latest service pack for Windows NT 4.0 or Windows NT Server 4.0, Terminal Server Edition. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
152734 How to Obtain the Latest Windows NT 4.0 Service Pack

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

  1. Start Registry Editor
  2. Navigate to the following registry subtree:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  3. From the Edit menu, click Add Value.
  4. Enter UnusedFileCache as the value name and set the Data Type to REG_DWORD.
  5. Click OK and enter a value of 0 (zero) or 5-40 as the data value.

    0 = Default behavior similar to Windows NT 4.0 Service Pack 3.
    5 - 40 Trim unused file cache based on pool usage.
    This number represents the percent of pool that we allow to be consumed by unused segments. Where 5 is most aggressive. (For example, it increases the size of the cache the least ) and 40 is least aggressive. (For example, lets the cache grow to the largest before trimming) .

    Internal testing found that this fix has positive benefits in that it alsoincreases the performance of some applications such as IIS. It works bestwhen set to 15-20. Do not choose a value greater than 20 without extensive stress testing.
  6. Click OK, quit Registry Editor, and then restart the computer.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
171458 Windows NT May Fail On Request to Open Large Files
The solution to this issue also improves the performance of the computer.
Microsoft has confirmed that this is a problem in Windows NT 4.0 and Windows NT Server 4.0, Terminal Server Edition. This problem was first corrected in Windows NT 4.0 Service Pack 4.0 and Windows NT Server 4.0, Terminal Server Edition Service Pack 4.

Article ID: 192409 - Last Review: 10/26/2013 04:49:00 - Revision: 3.0

  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
  • kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix KB192409