• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6595
  • Last Modified:

losing session and application variables on IIS 6.0

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
sybe
Asked:
sybe
  • 3
  • 3
  • 3
  • +4
5 Solutions
 
ap_sajithCommented:
>>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
 
ap_sajithCommented:
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
 
sybeAuthor Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
alorentzCommented:
>>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
 
BigToneCommented:
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
 
masirofCommented:
Can you ask them to restart server?
0
 
SlimshaneeyCommented:
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
 
sybeAuthor Commented:
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
 
alorentzCommented:
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
 
alorentzCommented:
www.1and1.com seems to be pretty good so far....
0
 
SlimshaneeyCommented:
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
 
ap_sajithCommented:
0
 
sybeAuthor Commented:
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
 
joeposter649Commented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 3
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now