locked
IIS 8 Application Pool Hogs Memory RRS feed

  • Question

  • User490699581 posted

    We (g2g.co)have migrated our Server from Windows 2008 R2 to Windows 2012 with IIS 8. Our migration seemed very smooth but we have hit two pain points.

    1. One of the Application Pool is continusouly consuming more and more memory. This is happening to a point where we see entire server crashing. (Note, the same application runs perfectly fine on a IIS 7 / IIS 7.5). We are running on a server wiht 32G RAM and I have see the Application Pool to have consumed more than 1GB Ram in a couple of hours time. On IIS 7, the pool will never go beyond 90MB.

    2.Regularly / Randomly see this Error : Event Code 3005 (Below please find the full log).

    Tried to run the app in a farm mode, single thread mode with no difference. Added Machine Key / Removed the key wiht no difference. Tried so many tips/tricks from the net but the problem seems to persist. 

    The migrated server is live at g2g.co! It is very fast and responsive, but very risky to continue. The pools have to be reset at regular intervals.

    What could be the reason? How to debug?  Is it possible to have IIS 7.5 on Windows 2012?

    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 11/11/2013 9:15:30 PM
    Event time (UTC): 11/11/2013 3:45:30 PM
    Event ID: 2cd14e47730943bdb5bfd4046a3a74c8
    Event sequence: 1002
    Event occurrence: 4
    Event detail code: 0
     
    Application information:
        Application domain: /LM/W3SVC/20/ROOT-1-130286489283385530
        Trust level: Full
        Application Virtual Path: /
        Application Path: C:\xyz\
        Machine name: HELLO
     
    Process information:
        Process ID: 6260
        Process name: w3wp.exe
        Account name: IIS APPPOOL\g2g
     
    Exception information:
        Exception type: MessageSecurityException
        Exception message: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

    Server stack trace:
       at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    The security context token is expired or is not valid. The message was not processed.
     
    Request information:
        Request URL: http://g2g.co/Opportunities.aspx
        Request path: /Opportunities.aspx
        User host address: 111.11.11.11
        User:  
        Is authenticated: False
        Authentication Type:  
        Thread account name: IIS APPPOOL\g2g
     
    Thread information:
        Thread ID: 40
        Thread account name: IIS APPPOOL\g2g
        Is impersonating: False
        Stack trace:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       
     

    Monday, November 11, 2013 11:11 AM

Answers

  • User490699581 posted

    The issue got resolved:

    1. We had not added "Machine Key" to all the applications on the Farm. This was the root cause for the "errors"

    2. We had to enable 32bit mode to get all the applications run smoothly. Guess some of the DLL's used needed 32big mode.

    3. We had to Enable "Load User Profile" for the Application pool one time and then Disable it.

    Now the app pools are behaving as expected.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, November 12, 2013 3:12 AM

All replies

  • User-2064283741 posted

    1) Looks like a standard memory leak scenario. You will need to debug your code.

    I presume you can recreate this on your test/dev/staging environment.

    Just because something woke in IIS7 doesn't mean it has been tested to work in IIS 8

    Also 1GB for an app pool is not a lot really. Sure if you are expecting a typical size to be 90MB it is alarming but by itself it should not crash the server, IIS or app pool.

    2) This can be if your system clocks are out of sync

    http://www.mythos-rini.com/blog/archives/2536#comments

    Monday, November 11, 2013 12:51 PM
  • User490699581 posted

    >Just because something woke in IIS7 doesn't mean it has been tested to work in IIS 8

    What are the recommended tests to confirm that the code will work on IIS 8? Any pointers would help in that direction.

    We changed the App pool to support 32big also and the problem seems to have resolved. Testing is on and can confirm tomorrow.

    Time difference between servers is not an issue.  Both are running from the same machine.

    Monday, November 11, 2013 2:22 PM
  • User490699581 posted

    The issue got resolved:

    1. We had not added "Machine Key" to all the applications on the Farm. This was the root cause for the "errors"

    2. We had to enable 32bit mode to get all the applications run smoothly. Guess some of the DLL's used needed 32big mode.

    3. We had to Enable "Load User Profile" for the Application pool one time and then Disable it.

    Now the app pools are behaving as expected.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, November 12, 2013 3:12 AM