session keeps dying?

  • Thread starter Thread starter Steve Letford
  • Start date Start date
S

Steve Letford

Hi,
I've just read the ms KB article on how sessions can die because of the
underscore in the machine name and don't think that it applies to me. I've
tried using the IP address of the server and have tested it locally using
localhost and my sessions still die.

It seems to happen on one particular page. It has some heavy db activity
but my connections are pooled.

It also seems to happen before any activity occurs once it has started to
fail then every postback to the same page will cause the session to die.

Does anyone have any ideas. Also if the aspnet worker process is recycled
would the memory process be set back to a low figure?

Thanks for any help.

Steve
 
If ASPNET worker process is recycled, your application is restarted.
Then you will loose all your sessions also.
 
The session_end can fire that often, if you had started a new session every
3-4 minutes. Then as those sessions end, the event is fired.
 
Thanks but I'm wondering why the session is ending. I'm not doing anything.
I'm just sitting watching the screen. My session timeout should be at 20
mins.

If the aspnet worker process is recycling wouldn't I see the memory usage of
it going down each time as it recycles, this isn't happening. Which leaves
me a bit confused..

Thanks for any more help.

Steve
 
Finally figured it out.
My page has a dynamically created javascript tree and I have a link that
allows all the items in the tree to expand or contract.
If this link is called then it loops through all the top level items and
sets a cookie saying expanded or contracted.

If I click on item at a time there is no problem the cookie is set and it
all works. But when the procedure is called that sets all the cookies at
once it kills my session????

my cookie names are all numbers, there aren't any strange characters so its
a bit of a mystery.

Appreciate any enlightenment.

Steve
 
Hi,

1) Check this:
The number and the size of the cookies on a client are restricted.
Maximal 300 cookies can be stored on a client.
If the 301st cookies should be stored, the least recently used cookie
will be deleted.
Maximal 20 cookies per server or domain can be stored on a client.
If the server wants to store its 21st cookie, the least recently used
cookie (from this server) will be deleted.

Try to use other method then cookies. It you need this data on the
server you can store it in ViewState for example.

2)aspnet_wp or w3wp process can shut down just one application which
"lives" in one AppDomain. if that’s happened the process memory usage
wont shrink dramatically.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
I think my cooke was getting too big, which may have been killing the
session?
 
Count the number of your tree leaf and figure it up ;-).

Anyway cookies don’t use to manage many state items.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
I am not sure about the memory usage. You can check the ASPNET worker
process recycling in the APplication Log of Windows Event Viewer.
Check those events where the source is ASP.NET. It will show some
thing like this

Event Type: Error
Event Source: ASP.NET 1.0.3705.288
Event Category: None
Event ID: 1003
Date: 8/6/2003
Time: 5:33:44 AM
User: N/A
Computer: RAM
Description:
aspnet_wp.exe (PID: 2456) was recycled because it was suspected to be
in a deadlocked state. It did not send any responses for pending
requests in the last 180 seconds.
 
Back
Top