Solved

losing session and application variables on IIS 6.0

Posted on 2004-09-14
14
6,572 Views
Last Modified: 2009-01-15
A number of websites with database/session based login have recently been moved from IIS5.0 to IIS6.0
Everything works, except that the Session and Application variables are lost every 3-4 minutes. The fact that also the Application variables are lost, means that somehow the application is being restarted ever so often.

Has anyone experiences like this?
Can anyone point me to why this happens and how it can be solved?



0
Comment
Question by:sybe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +4
14 Comments
 
LVL 21

Accepted Solution

by:
ap_sajith earned 100 total points
ID: 12052526
>>Has anyone experiences like this?<<

No, I havent come across such an issue yet. However, it would be helpful if you posted the code that sets the application variable.

Also, did you check the Event logs for anything that could be causing the restarts.

Cheers!!
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 12052553
Another thing that just came to my mind... Maybe the Virus scanner is messing around with the asp pages. Try running your code after disabling the virus scanners. Or, make sure that .asa and .asp files are excluded from realtime filesystem protection feature.

Cheers!!
0
 
LVL 28

Author Comment

by:sybe
ID: 12052621
the problem is that it's on a remote server i can not control.

There wasn't any global.asa before, but i noticed that session variables kept disappearing after 3 minutes (not very user friendly if you want to update your data). I put in a global.asa just to check what was happening: does the website only lose Sessionvariables, or also Applicationvariables. It is losing both every three minutes.

All sites on this server were recently moved to a new server. They were working without problems on the old server.

global.asa is this:

<%
Sub Application_OnStart()
    Application("starttime") = Now()
    Application("starttimer") = Timer
    Application("test") = 1
End Sub

Sub Session_OnStart()
    Session("starttime") = Now()
    Session("starttimer") = Timer
    Session("test") = 1
End Sub
%>

The virus-scanner isn't a very bad idea, i'll check that. As far as my knowledge goes only editing the global.asa will restart the application, am I right?
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 31

Assisted Solution

by:alorentz
alorentz earned 100 total points
ID: 12053099
>>the problem is that it's on a remote server i can not control.

That's probably it, they are doing something.  Who is controlling the server...?

I know you are quite familiar with coding, so this is most likely not a coding issue.
0
 

Assisted Solution

by:BigTone
BigTone earned 100 total points
ID: 12053104
Restarting IIS, stopping/starting a website within IIS or causing the global.asa file to change will cause the Application/Session objects to be repopulated.

As well as that, if you call Session.Abandon, that will end the Session prematurely. If all Sessions end within an application, the application's ON_END block calls, and wipes the App out too.

It's also possible that another site on your host's server - in your application pool on Windows Server 2003 or on your server in Windows Server 2000 - could be causing IIS to restart itself. If that's what's happening, there's very little you can do short of creating new ways of storing your session/application state elsewhere (such as a local MSDE database, text files etc...)
0
 
LVL 6

Assisted Solution

by:masirof
masirof earned 100 total points
ID: 12053613
Can you ask them to restart server?
0
 
LVL 11

Assisted Solution

by:Slimshaneey
Slimshaneey earned 100 total points
ID: 12054052
I believe there is a feature of IIS6 that restarts the Application or IIS every time a major fault happens, or every 5,000 page hits. It should persist the data, but maybe that is not happening. I could be talking utter rubbish, wouldnt be the first time, but I do remember reading something along those lines...
0
 
LVL 28

Author Comment

by:sybe
ID: 12054099
I have been suggesting the virus-scanner top the admins of the site(s). Waiting for them to answer now. They are somewhere at the other side of the globe, so i don't know how long it will take for them to answer.

Anyway, thanks for the suggestions so far. And if you have any more ideas: let it come. It's quite nasty that our customers have to login every 3 minutes.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12054158
There are a number of things in IIS6 that will cause IIS to restart....quite stupid actually for just this reason!

http://www.microsoft.com/resources/documentation/IIS/6/all/techref/en-us/iisRG_ADM_20.mspx
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12054169
www.1and1.com seems to be pretty good so far....
0
 
LVL 11

Expert Comment

by:Slimshaneey
ID: 12054266
Sybe, you prolly already seen this. Most av scanners allow you to skip directories dont they?

http://support.microsoft.com/default.aspx?scid=kb;en-us;316148
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 12061508
0
 
LVL 28

Author Comment

by:sybe
ID: 12066917
The admins said:

"A worker process with process id of 'xxxx' serving application pool 'domain.com' has requested a recycle because it reached its virtual memory limit. "

In don't know, but the problem seems solved now.
Thanks everyone for their input and ideas. I'll give everyone points who went through the trouble of answering.
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 13097824
Perhaps it's anti-virus software...
http://support.microsoft.com/default.aspx?kbid=303881

They should be able to check their logs to see if the application is restarting.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Button to go back 3 45
Jquery Check against database on select from auto fill not working in all browsers 5 58
JS to redirect to prev page 8 47
calculate days away 11 62
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question