8

We have a .net web application hosted on IIS 7.5. Earlier this application was running on a 32bit application pool but some time ago we've switched to 64 bit application pool.

Recently users have started to complain that after 1-2 minutes of idling their session is being killed which we have confirmed today.

In the web.config file the session timeout is set to 60 minutes. Also we have noticed in task manager that the w3wp process for this application consumes about 2-2,4GB of memory so maybe the problem is that the application pool is trying to recycle some memory?

The recycling is set to limited time periods 21:00 and 4:00

What could be the reason for this problems with sessions?

EDIT:

I have inspected some counters and done the basic memory dump analyze but I don't see any problems.

Permfon data

In the dump eeheap analyze I see only generation 2 objects about 10-30MB for every heap and I have 24 of them

Heap 0 (0000000003083a90) generation 0 starts at 0x00000000fff568b8 generation 1 starts at 0x00000000ffa6acf0 generation 2 starts at 0x00000000ff471000 ephemeral segment allocation context: none segment begin allocated size 00000000ff470000 00000000ff471000 00000000ffff8de0 0xb87de0(12090848) Large object heap starts at 0x00000006ff471000 segment begin allocated size 00000006ff470000 00000006ff471000 00000006ff7495c8 0x2d85c8(2983368) Heap Size: Size: 0xe603a8 (15074216) bytes.

Heap 1 (00000000030889c0) generation 0 starts at 0x000000013fc36ed8 generation 1 starts at 0x000000013f949348 generation 2 starts at 0x000000013f471000 ephemeral segment allocation context: none segment begin allocated size 000000013f470000 000000013f471000 000000014035e7b8 0xeed7b8(15652792) Large object heap starts at 0x0000000703471000 segment begin allocated size 0000000703470000 0000000703471000 00000007035c5d58 0x154d58(1396056) Heap Size: Size: 0x1042510 (17048848) bytes.

EDIT: 2015-08-19 09:00 Those are the counters for 09:00 2015-08-19

What worries me is why the memory in task manager shows 2,5GB when the Bytes in all Heaps shows only about 100MB and why the Private Bytes (216MB) are bigger then Bytes in all Heaps? The load in this current moment is about 40 users on this server.

PERFMON AT 2015-08-19 09:00

EDIT 2015-08-19 14:09

After some time I see that there could be a problem with assemblies. How can I check this with windbg when I'm on .NET 4.5 where there is no !dda command?

PERFMON ASSEMBLIES

shin
  • 666
  • 2
  • 9
  • 25
  • Do you have un-managed code in there? – T.S. Aug 11 '15 at 21:12
  • Are you hosting the site in load-balanced infrastructure? Are you using InProc sessions or Sql? – nimeshjm Aug 11 '15 at 21:57
  • I think there is no un-managed code in this application. As it comes to load-balanced infrastructure we are using the default windows feature with two servers hosting this application. Yes the session mode is InProc. – shin Aug 12 '15 at 09:28
  • did you confirm in the task manager that the processes actually run in 64 bit mode(on each server)? you did not change the idle timeout by any chance? – Bombinosh Aug 14 '15 at 15:52
  • Yes the process definitely runs under 64bit mode. I'm pretty sure timeouts are set properly (I will post some settings tomorrow). When there are about 30-40 users everything seems to work OK, but later when there are about 70-90 users those sessions problems occur. – shin Aug 16 '15 at 11:22
  • The fact ASP.NET recycles is a memory issue. It impacts sessions, but may not be directly related to sessions at all. There are an infinite amount of reasons that can cause memory issues.I suggest you dig in asp.net debugging with Microsoft's Tess Ferrandez excellent blog here: http://blogs.msdn.com/b/tess/archive/tags/memory+issues/ (for example as a start: http://blogs.msdn.com/b/tess/archive/2007/08/09/asp-net-memory-issue-high-memory-usage-in-a-64bit-w3wp-exe-process.aspx) – Simon Mourier Aug 17 '15 at 06:14
  • So what you are saying is that users load are 70-90, this session issue starts occurring. Do you you know if you are storing large objects in session? – Nirav Vyas Aug 18 '15 at 16:07
  • Yes this number of users leads to those problems. But also during the day sometimes application crashes and recycles (I see this in event log). I don't think we are storing some large objects in session at least it is what I think after inspecting dump in windbg. I have updated my question with some data from morning. – shin Aug 19 '15 at 08:03
  • I found that one of the reason could be an assembly leak but I don't know how to find its source with windbg – shin Aug 19 '15 at 14:14
  • You could try `process explorer` to, at least, list the modules (even dynamic) w32p process is loading. https://technet.microsoft.com/en-us/sysinternals/bb896653 – jlvaquero Aug 21 '15 at 09:36
  • You're using session mode InProc with a load balancer? This could be why sessions are lost. Session is started on server A and server B gets the subsequent request with no reference to the session on server A. http://stackoverflow.com/questions/18218663/in-proc-session-state-mode-on-a-multiple-server-setup . Generally in load balancer scenarios, you should use database persistence. – Bill Martin Aug 21 '15 at 18:58
  • Yes we're using InProc with load balancer but we have been using it for few years on the same machines and everything was ok. We've just switched from 32 to 64 bit. – shin Aug 25 '15 at 05:51

1 Answers1

0

Try copy the running app to a different pool but in this new one disable all assemblies / references that you dont need, to see what is doing that.

Like you said i think that some assembler is crashing your application pool, maybe because maybe isnt support for 64 bits.

Try disabling all references that you dont use, update all, etc.