PDA

View Full Version : Sessions Dropping Out


ic3
04-21-2004, 03:29 AM
Hi, I'm using sessions for a project at work. It is a multiple page form that all gets submitted into a database at the end. I am using sessions to store each page, so that the user can go back and forth between each page and not lose their information.

However, for some reason, every now and then (there is no pattern spotted so far), the session from the first page of the form, drop out. They just disappear. I have done as much testing as possible, and after looking at all the results I have not found a pattern at all. So far, after a bit of debugging I have found that it happened between the 2nd and third page, although that was just once, just waiting for more results to come in.

This is really starting to annoy me, as I have gone through all my code, and can't find a single thing that affects the sessions, apart from when they are first created. Has this ever happened to anyone before, and if so how did you fix it? Also, if it hasn't happened to you, do you know of a way to fix it? Any help would be greatly appreciated.

Cheers

oracleguy
04-21-2004, 05:06 AM
Although this isn't going to be much help, I have experienced this problem before. At work, my team's flagship intranet app was having problems where on some pages for no apparent reason the cookies/session would be lost. The closest thing we could determine is that if you use too many cookies, the browser will "overload" so to speak, and loose all of the cookies. So you aren't the first to face this problem. The defect regarding this in our product ended getting assigned to me and I couldn't find any definative answer on the topic. The best I could conclude it partially has something to do with IE because in Moz or Firefox it wouldn't have a problem.

How many variables are you using and what browser?

ic3
04-21-2004, 05:32 AM
How many variables are you using and what browser?

This problem is happening on both Internet Explorer 6 and (don't ask, because I really can't stand it) Netscape 4.7x!

Now that you mention it, probably too many variables. Looking through my code, we have

1st Page - 8
2nd Page - Approx 20
3rd Page - Approx 30
4th Page - 24

Along with a fair number of other Sessions holding information about the users. After working it out, that is now about 80-90 sessions open in one go...hmm...could this be the reason?

oracleguy
04-21-2004, 09:50 PM
I also was forced to support IE with the application I worked on and I think that it's cookie handling code is slightly faulty. Once I reduced the number of cookies I was using, it seemed help some but I was still using a lot (there was no way around it).

Reducing the number of cookies may help in your case, I'm afraid I don't have too much else to tell you. It is definetly a bizzare problem that isn't encountered much.