locked
SMB Error 0xC0000205 (STATUS_INSUFF_SERVER_RESOURCES) RRS feed

  • Question

  • I'm using the Java library jCIFS to transfer files to a share on a Windows 2008 R2 64-bit server with authentication.  I'm running into an intermittent issue where the server responses with SMB error code 0xC0000205, which is STATUS_INSUFF_SERVER_RESOURCES: "Insufficient server memory to perform the requested operation" (from SMB Error Classes and Codes).  This error is coming back in response to a SMB_COM_NT_CREATE_ANDX command.

    These servers have plenty of free physical memory (>4GB free, >=8GB on the system typically), and there are no corresponding events in the Windows Event Viewer.  Immediate retries of the same operation sometimes succeed and sometimes fail for the same reason.

    I've tried the workaround described in the KB307257 regarding the XactMemSize parameter, but the problem keeps coming up.  I'm looking for any more information here and haven't found much searching around.  Is there a way to enable more SMB logging or events?  This is through the LanmanServer process, right?  I've browsed the LanmanServer configuration parameters without finding anything.  

    Any help is greatly appreciated.  Thanks!

    Tuesday, March 13, 2012 7:23 PM

Answers

  • Mike,

    Thank you again for your help, and you'll forgive my frustration.  I had to leave this for a while but it kept coming up occasionally.

    It looks like the problem was related to the LanmanServer tuning settings.  KB232271 shows that LanmanServer may be tuned in the following four ways,

    1. Minimize Memory Used
    2. Balance Performance and Memory Consumption
    3. Maximize Throughput for File Sharing
    4. Maximize Throughput for Network Applications

    This tuning is configured through these two registry values,

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\size
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

    I found that the systems reporting this issue were configured to Minimize Memory Used (size=1, LargeSystemCache=0).  I changed this tuning to Maximize Throughput for File Sharing (size=3, LargeSystemCache=1).  So far, so good.

    Thanks again for your willingness to work with me on this one.

    Tuesday, July 10, 2012 10:37 PM
  • Since it is using the third party library, it's hard for us to take it and test it, and do all the narrow down problems steps(we don't know what it did), and after I read this case, it makes me think that maybe it would be better to ask helps in that third party library's forum. 

    If just through the error message, then I would suggest you consider try those registry changes:

    http://support.microsoft.com/kb/177078 

    http://smallvoid.com/article/winnt-smb-settings.html 

    http://technet.microsoft.com/en-us/library/dd296694(v=ws.10).aspx 

    And reboot the system after each changes, and then test if it work; then try the next changes and reboot, test...


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by NullMan Friday, March 16, 2012 7:34 PM
    Friday, March 16, 2012 10:53 AM

All replies

  • Please use their mailing list for the library usage problem in your developing time: http://news.gmane.org/gmane.network.samba.java (which link is founded in this website http://jcifs.samba.org/)

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    Thursday, March 15, 2012 12:18 PM
  • This is a disappointing response.  I will re-post on jCIFS' message boards, but the SMB error is being returned by Windows.  I have observed the error returned with a packet sniffer (on the SMB port, 445), so I am convinced the error is being raised by Windows, not jCIFS.
    Thursday, March 15, 2012 7:53 PM
  • Since it is using the third party library, it's hard for us to take it and test it, and do all the narrow down problems steps(we don't know what it did), and after I read this case, it makes me think that maybe it would be better to ask helps in that third party library's forum. 

    If just through the error message, then I would suggest you consider try those registry changes:

    http://support.microsoft.com/kb/177078 

    http://smallvoid.com/article/winnt-smb-settings.html 

    http://technet.microsoft.com/en-us/library/dd296694(v=ws.10).aspx 

    And reboot the system after each changes, and then test if it work; then try the next changes and reboot, test...


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by NullMan Friday, March 16, 2012 7:34 PM
    Friday, March 16, 2012 10:53 AM
  • Fair enough.  I also noticed the post on stackoverflow.  I don't think I'm running into that case, but it is possible.  Thank you for your other references.  I will test them out.

    The frustration I have here is that I'm getting an SMB error without any additional information.  While I appreciate your links, I'm now left to trial and error on these various settings.  Hopefully I'll find the magic mix to avoid this error.  It would be better if I could get any more information about why this error is occurring.  Is there any additional logging/events I can enable for SMB?  

    Thanks again.  Although I find this issue frustrating, I appreciate your help and feedback, and I can understand how the interaction with third-party libraries can make assisting difficult.

    Friday, March 16, 2012 7:34 PM
  • Ok, I've got a little more information.  The links you posted moved me towards looking at perfmon for additional information.  I found that when this failure is occurring, the Server\Blocked Requests Rejected counter registers a spike from 0 to 1.  So, I'm dealing with a rejected blocking server request.  Work item shortages isn't showing any activity, and the server is not heavily being used.  I'm only trying to transfer a single file at a time.

    I added more perfmon counters and found something curious.  The server I'm working on has two hex core processors with hyper threading enabled for a total of 24 virtual processors.  When monitoring the Available Work Items counter, instances 22 and 23 show zero while the other instances show one.  If my request is coming into one of those processors, I could see the request being rejected.  I tried adding MinFreeWorkItems at 4 but that didn't help.

    Friday, March 16, 2012 10:29 PM
  • I should admit that there's really too much things I'm not clear on SMB tech here.

    I think maybe you can create a new thread, I will try to involve others engineers to discuss with you.

    Sorry for any inconvenience, if there's any missing caused by my not right SMB dev experience.

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    Monday, March 19, 2012 10:46 AM
  • Mike,

    Thank you again for your help, and you'll forgive my frustration.  I had to leave this for a while but it kept coming up occasionally.

    It looks like the problem was related to the LanmanServer tuning settings.  KB232271 shows that LanmanServer may be tuned in the following four ways,

    1. Minimize Memory Used
    2. Balance Performance and Memory Consumption
    3. Maximize Throughput for File Sharing
    4. Maximize Throughput for Network Applications

    This tuning is configured through these two registry values,

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\size
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

    I found that the systems reporting this issue were configured to Minimize Memory Used (size=1, LargeSystemCache=0).  I changed this tuning to Maximize Throughput for File Sharing (size=3, LargeSystemCache=1).  So far, so good.

    Thanks again for your willingness to work with me on this one.

    Tuesday, July 10, 2012 10:37 PM
  • You're welcome, and I think I also need to thank you for sharing your solution and experiences here, it also let me learn some SMB knowledge when work with you on research this question.

    Good day!


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, July 11, 2012 5:18 AM
  • Problem cured here too.  Thanks.
    Saturday, June 27, 2015 12:31 AM
  • This just saved my butt, thanks NullDude
    Friday, July 7, 2017 6:24 PM