locked
ASP.NET APPLICATIONS - HIGH SESSIONS ACTIVE COUNT RRS feed

  • Question

  • User549530010 posted

    Running multiple websites on IIS 6.0 on Windows 2003 Standard.

    One instance (ASP.NET version 2.0.50727) is showing a 'ASP.NET Applications / Sessions Active' to be a constant high value of 4294967114.  This will immediately increase to this value after the IIS services have been running for less than 30 seconds.  This instance is for a virtual directory with its own dedicated application pool.

    The registry has the proper permissions for the NETWORK SERVICE to access (HKLM\System\CurrentControlSet\Services\ASP.NET_2.0.50727\Names - Allow:  Query Value; Set Value; Create Subkey; Enumerate Subkeys; Notify; Read Control - applies to 'This key only')

    Anyone have any ideas as to why this value would always be so high?

    Thanks in advance for any assistance.

    Sunday, September 16, 2007 12:43 AM

Answers

  • User113421904 posted

    Hi brikeler,

    Based on my research, there does exist 'Session Active' counter, however I can't find the 'ASP.NET Applications / Sessions Active' in ASP.NET performance objects in the Performance Monitor. Could you tell me which performance objects category does it belongs to? It might be a custom counter as well.

    According to this TechNET document: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a8c5b994-7722-4dc6-a246-7dfe667c6816.mspx?mfr=true, 'Session Active' counter is used to track the number of sessions that are active. So the 'ASP.NET Applications / Sessions Active' counter might be the number of ASP.NET Applications divides the number Active Sessions. If the latter has a lower value, the resulting value might be high. Could you verify if the seporate value is normal in about 30 seconds?

    Hope it helps.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, September 17, 2007 11:15 PM

All replies

  • User113421904 posted

    Hi brikeler,

    Based on my research, there does exist 'Session Active' counter, however I can't find the 'ASP.NET Applications / Sessions Active' in ASP.NET performance objects in the Performance Monitor. Could you tell me which performance objects category does it belongs to? It might be a custom counter as well.

    According to this TechNET document: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a8c5b994-7722-4dc6-a246-7dfe667c6816.mspx?mfr=true, 'Session Active' counter is used to track the number of sessions that are active. So the 'ASP.NET Applications / Sessions Active' counter might be the number of ASP.NET Applications divides the number Active Sessions. If the latter has a lower value, the resulting value might be high. Could you verify if the seporate value is normal in about 30 seconds?

    Hope it helps.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, September 17, 2007 11:15 PM
  • User549530010 posted

    Thank you for your reply.  I appreciate your time.

     The 'Sessions Active' comes from the various Application Pools assigned on the server.

    In this particular case, the Performance object is ASP.NET Apps v2.0.50727, Counter = Sessions Active, Instance = _LM_W3SVC_2010009591_Root_GiftCard.

    The value never appears to show as 'normal', it just sits at 4294967167.

    Tuesday, September 18, 2007 1:20 AM
  • User113421904 posted

    Hi brikeler,

    Do you mean it always sits at 4294967167 when it reaches this value? 

    Although it doesn't look like the server is a heavy load one. Based on my understanding, you could still try following code to keep track of active session number in code. This can be used to compare to the current Session Active number. The session time out value in web.conf file was changed to one minute to make it easier to monitor the change of the active session number. In my test, the number is same as the Session Active counter. Otherwise we may need to go further to find out what is going on with the Session Active counter.

    //Global.asax

        void Application_Start(object sender, EventArgs e)
        {
            Application["ActiveSession"] = 0;

        }

    ....
        
        void Session_Start(object sender, EventArgs e)
        {
            Application["ActiveSession"] = (int)Application["ActiveSession"] + 1;

        }

        void Session_End(object sender, EventArgs e)
        {
            Application["ActiveSession"] = (int)Application["ActiveSession"] - 1;
        }

    // .aspx

    Response.Write(Application["ActiveSession"]);

    // Web.conf

        <sessionState mode="InProc" timeout="1" />

     

    Tuesday, September 18, 2007 6:36 AM
  • User549530010 posted

    "Do you mean it always sits at 4294967167 when it reaches this value?"

    Yes

    I will speak with our developers to see if we can implement this and see what it reveals.

    To your knowledge, any reason why this counter is so high.  Other counters of the same type (but not all) appear to behave in an expected manner (numbers below 100 and fluctuating).

     

    Tuesday, September 18, 2007 8:30 PM
  • User113421904 posted

    Hi brikeler,

    Do you have any other server facing the same issue? Based on my understanding, it might be our product issue. However I would like to verify first if this is the case. The code provided in my last post can be used to narrow down the issue.

     

    Wednesday, September 19, 2007 3:39 AM
  • User-742101796 posted

    Hi Zhao,

    This happens in our Production Web server. The Active Session count is consistently around 4294958367. Memory usage on the server looks normal though. When there is iisreset, the count goes down to 0 and comes back to this huge number in a few minutes. There is only one website running on this server and the website has its own AppPool.

    There is another problem with the server. Sometime  the processor usage spikes to 100% and doesnt come down. The server hangs and we need to force it by doing an IISreset. The process that takes all 100% is w3wp.exe. To solve this problem, we do an IIS Reset when the CPU spikes over 90%, this brings the processor back to normal.

    Are these related? Do you know what could be causing this?

    Thanks..

     

     

     

    Tuesday, May 20, 2008 10:47 AM
  • User1216490608 posted

    The Active Session count is consistently around 4294958367
     

     Hi,

    Im having the exact same simptoms, did you find the reason for that?

    do you have any solution?

    Thanks

    Tok

    Tuesday, July 15, 2008 6:55 AM
  • User-742101796 posted

    No solutions.

    Appears like some obvious bug in the performance counters. I dont see any performance drop because of this. Do you?

    Tuesday, July 15, 2008 12:01 PM
  • User-1956207101 posted

    We have the exact same problem.

    This was working fine I was monitoring Active sessions for months, the two things that changed in our world were, the introduction of .net 3.5 on the server and visual studio 2008 compiled code.

    Since most these blogs are old I assume there is a solution.

    I basically need to know how many sessions are active on our app using the perf-mon

    Thank you

    Monday, November 24, 2008 12:19 PM
  • User-550804263 posted

    Anybody, i am also having the same issue for my applications running under 3.5SP1 framework, session active counter showing some crazy values.

    Any help?

    Tuesday, December 2, 2008 8:18 PM
  • Friday, February 13, 2009 2:47 PM
  • User2084429284 posted

     If you are running a 64bit system, the old asp.net counters might still be 32 bit and cause these high active session errors.

     You can see these errors in the application logs of your server.

    Friday, March 13, 2009 6:53 PM
  • User556050036 posted

    Hi brikeler, 

    it's a good question that you have asked. It has really worth. I was wondering to know the same.

    Thanks!

    Sunday, March 15, 2009 3:54 PM