none
RWW on SBS 2011 - Unexpected Error

    Question

  • After some Windows updates and a reboot one of our client's SBS 2011 Standard server has starting having issues with Remote Web Workplace. Don't know if it was caused by the updates, but started happening after reboot.

    They can access the site and log in, but if they click on any of the folder shares they get "an unexpected error has occurred". Also if they click on Connect to remotely log into their computer, nothing happens. But OWA still works.

    The only thing that fixes it is an IISreset in a command prompt, but then within hours it starts up again (randomly). No errors, nothing in the Event Viewer that I can see related to IIS.

    The server is running IIS 7.5 and I did read somewhere else that they had to revert to 7.0 to get RWW working again. Not a fix. I have several other clients with SBS2011 and IIS 7.5 and they are working fine.

    Friday, December 06, 2013 11:18 PM

All replies

  • Hi:

    Have you run the Fix My Network Wizard and the BPA?  These will often give you clues. Any errors in the event logs that point to anything?


    Larry Struckmeyer[SBS-MVP] If your question is answered, please mark the response as the answer so that others can benefit.

    Sunday, December 08, 2013 12:30 AM
    Moderator
  • check if SSL certificates‎ did match the domain you were using for RWA exactly.

    Best,

    Howtodo

    Monday, December 09, 2013 4:11 PM
  • Ran the Fix My Network with no luck, but the BPA did point out some issues. Not sure they are related, but I'm correcting them and I will report back.

    The Event logs don't shine any light on anything.

    Monday, December 09, 2013 8:50 PM
  • SSL certificate is good.
    Monday, December 09, 2013 8:51 PM
  • I'm not sure this is the same thing, but I had similar recently. Google found me this:

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

    It didn't work for me, but it might be worth a try. In the end, what worked for me was to clear the history/cookies/cache on the browser.


    Monday, December 09, 2013 9:08 PM
  • Part of the fix for some of the issues found by BPA was to cycle IIS, so it is up and running for now. I will have to wait and see if it stops again and then report back. Random issues are always a pain.

    Monday, December 09, 2013 9:40 PM
  • By any chance was .net 4.5.1 installed?

    Unfortunately TechNet isn't coming back, sorry folks :-(

    Wednesday, December 11, 2013 8:18 AM
    Moderator
  • Well its back again, so the items fixed from the BPA didn't fix the issue.

    James, I'll check on that, but this is company wide, not a specific user.

    Susan, Yes, .NET 4.5.1 is installed, but the AppPool for the Remote site is using 4.0.30319. Do I need to remove 4.5.1?


    EDIT: James, tried that with one of the users, and it didn't work.
    Wednesday, December 11, 2013 11:43 PM
  • What's the ram installed on this box?

    After someone installed 4.5.1 on a box they kept getting disconnects....

     He remoted into one of my troublesome SBS2011
              boxes and saw the issue firsthand. The first thing he did was
              kill the Exchange store and the problem went away. The problem
              is low memory and RWA is the first to go.  He said he’s seen
              this many times before. He increased the pagefile and I
              defragged store and problem solved. I’m also going to add more
              memory per the engineer’s suggestion.  On another box I just
              increased the pagefile with no defrag and the problem went
              away.  The box the MS engineer worked on had 12GB.  The other
              16GB.

    http://www.thirdtier.net/2012/01/solving-the-unresponsive-exchange-sbs-server-problem/ I would throttle Exchange memory use to see if that does the trick


    Unfortunately TechNet isn't coming back, sorry folks :-(

    Friday, December 13, 2013 2:06 AM
    Moderator
  • I agree that it is a memory issue. Don't know if I just missed it before or this is the first time it is showing up in the Event Viewer, but now I'm seeing this:

    WebHost failed to process a request.

    Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/2615944

    Exception: System.ServiceModel.ServiceActivationException: The service '/Remote/BuiltIns/RDP/RemoteDesktopWebService.svc' cannot be activated due to an exception during compilation.  The exception message is: Memory gates checking failed because the free memory (522960896 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.. ---> System.InsufficientMemoryException: Memory gates checking failed because the free memory (522960896 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.

       at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)

       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)

       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

       --- End of inner exception stack trace ---

       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

       at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)

    Process Name: w3wp

    Process ID: 16276

    Researched that and found a post:

    Solution is written in your post.

    To resolve this, either reduce the load on the machine or adjust the  value of minFreeMemoryPercentageToActivateService on the  serviceHostingEnvironment config element.

    The easiest way just add this into your web.config

    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" />
    

    The server has 32GB of RAM installed and the Store is using up 20GB. I will throttle Exchange memory use and see what happens. What a pain Exchange has become. Pre-2007, memory hoging was never an issue with Exchange.



    Friday, December 13, 2013 8:19 PM
  • Susan,

    Thanks for the direction, but I'm a little lost. The link you gave lays out the issue and talks about modifying the msExchESEParamCacheSizeMax and Min, but the link to the article that explains how to do that is now broken cause it references 2000:

    LINK GOES HERE BUT i GUESS I'M NOT VERIFIED, SO I HAD TO REMOVE IT. LAME

    In addition, the other tech article talks about changing the Max and Min in Active Directory. I can find no Information Store object in AD with Advanced Features enabled.

    I'll read up and do my Google searches on how in the heck to just make Exchange not use so much memory.

    EDIT:

    Ok, found a post that helped me with getting to where to set the Max and Min using ADSI Edit. (would post a link but lame MS hasn't verified me yet. Whatever that means)

    Now I'm having issues with figuring out the max and min values. You have to take whatever your max and min are, in KB, and divide it by 32KB. No biggie. Here is my issue. The article says 4 GB = 4,192,304 KB......I can't for the life of me figure out how they get that KB number from 4 GB.

    1GB = 1024MB, 1MB = 1024KB, so 1GB = 1,048,576KB. Take that times 4 and get 4,194,304. Am I missing something?


    Friday, December 13, 2013 8:40 PM
  • Bad link - it should be this


    How to modify the Store Database maximum cache size in Exchange 2000
    Server:

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


    Unfortunately TechNet isn't coming back, sorry folks :-(

    Saturday, December 14, 2013 1:29 AM
    Moderator
  • Ok, tried the whole Max Min thing this weekend, but after I cycled the Info Store service, store.exe never got over 130MB. I set the min to 5GB and the max to 15GB. After leaving it running for half a day, it never got any bigger, so I removed the min and max and cycled the service again, which went back to normal.

    I set the min to 5 GB. (1,048,576 KB x 5) / 32 = 163840

    I set the max to 15 GB (1,048,576 KB x 15) / 32 = 491520

    Did I do something wrong there? Math messed up?


    Where is the web.config file?
    Monday, December 16, 2013 9:10 PM
  • Hi:

    Working from memory here as I did not review the link to TT site, but iirc it gives specific numbers that worked for them and when I used those numbers it has worked for me.


    Larry Struckmeyer[SBS-MVP] If your question is answered, please mark the response as the answer so that others can benefit.

    Tuesday, December 17, 2013 3:01 AM
    Moderator
  • I don't understand what you are telling me Larry....

    From memory there was a link to some site called TT? But you didn't review it? What is IIRC?

    Wednesday, December 18, 2013 1:52 AM
  • TT = Third Tier.  IIRC = if I recall correctly.  The reference is to the Third Tier blog about this issue and that, iirc, they listed specific numbers to input for min and max.  If I do that the results are, like all the children in Lake Wobegone. (hint:  if you don't know that reference, you might try internet search  <g>).

    Larry Struckmeyer[SBS-MVP] If your question is answered, please mark the response as the answer so that others can benefit.

    Wednesday, December 18, 2013 2:07 AM
    Moderator
  • Ok, well unfortunetly that doesn't help me fix anything. Not sure what above average children has anything to do with my issues or what numbers you used....above average numbers?

    Moving on. Can someone please check my math and see where I messed up. Thanks.

    Thursday, December 19, 2013 1:13 AM
  • 1GB of memory in 32kb pages is equal to 32678 pages.

    The math changes a bit depending on which version of Exchange you are using. Here were talking about Exchange 2010 which uses the 32kb page size. For this entry you need to enter the number of pages that you want to reserve for Exchange and do note (since I found out the hard way) that you must put in an minimum and a maximum value. BOth of those must be valid both from a math standpoint and a workable standpoint. That is, if you set a number that is too low Exchange will ignore the values all together.

    I have a made a note to edit the post to link to the NEW location of that Exchange article. The fluid nature of the Internet makes it difficult to keep links in old blog posts alive. Look for an update tonight.


    thanks, Amy

    Thursday, December 19, 2013 8:36 PM
  • Thank you Amy. So If 1GB of memory in 32kb pages is equal to 32678 pages, would 5GB equal 163390 and 15GB equal 490170? Can I just simply multiply 5 and 15 times 32678 pages?
    Monday, December 23, 2013 5:38 PM
  • Well, I see this dried up.......

    Thanks Amy for the help, but I tried the whole pages thing and it didn't work. Seems no matter what I put in, no matter how I do my math, it would never work.

    Got a fix from another thread, so I thought I would post it up here in case someone else reads this.

    You have to modify the web.config under the folder

    C:\Program Files\Windows Small Business Server\Bin\WebApp\RemoteAccess

    Inside web.config find the line
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    Change it to be
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="0" />

    Then to see applicate your change you need to do a IISRESET

    After doing this, everything seems to be working correctly for about a week now. I have since also found the proper math for the pages thing, but I have not tried it myself since this is working. But just in case someone else wants to try it:

    nx1024x1024/32  (where n is the value of RAM in GB that you would like to assign store.exe)

    On Exchange 2010 SP1, you need to set msExchESEparamCacheSizeMaxand also msExchESEparamCacheSizeMin.

    If you set only msExchESEparamCacheSizeMax, Exchange will simply ignore it.




    Monday, December 30, 2013 5:39 PM
  • It didn't dry up, I'm still pushing MS for an official blog post.

    Unfortunately TechNet isn't coming back, sorry folks :-(

    Monday, December 30, 2013 5:42 PM
    Moderator
  • Did you get any error message like the below in your event logs?

    WebHost failed to process a request.

    Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/18025223

    Exception: System.ServiceModel.ServiceActivationException: The service '/Remote/BuiltIns/RDP/RemoteDesktopWebService.svc' cannot be activated due to an exception during compilation.  The exception message is: Memory gates checking failed because the free memory (1552068608 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.. ---> System.InsufficientMemoryException: Memory gates checking failed because the free memory (1552068608 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.

     


    Unfortunately TechNet isn't coming back, sorry folks :-(

    Monday, December 30, 2013 5:52 PM
    Moderator
  • I have used this solution too. But not for this reason. The solution isn't really a solution. What it does it tell IIS to process the request whether or not it thinks that the server is out of memory. In my case my terminal server would spike briefly and then lock new connections out. Once the memory was spiked the event was triggered and that was that.

    So just be aware that while it may be working, if your server really is drained of free memory (in my case it wasn't a sustained memory problem) you'll end up potentially creating a new problem. As I understand it this code is in there to prevent corruption. 


    thanks, Amy

    Monday, December 30, 2013 5:58 PM