Currently I need to store up to 80 Kb in a session variable and it seems that I kind of lost the session variable. I'm pretty sure that the reason of this is that the server on which my application is install has some sort of session variable maximum. Do someone know where can I check this, or how can I increase this..
Are you really sure that's what you want to do? Are you talking about adding an 80k variable to the session object? I obviously don't know your application, but it seems like having every session object carrying around a potential 80k is a real good way to kill the server or at least degrade performance. I'm no expert, but I'd really look to see if there is another way of doing this.
Joined: Feb 23, 2004
Lets say its a smaller type of session object. I'm still loosing my session variable from one page to another even if we are talking of 1/2Kb or less. The weird thing is that I'm not loosing the others variables. I have tested this application in other servers and it seems to be ok, but in this server doesn't quite follow with the session variables. Now, I think it can be a server issue but I'm not sure where to look. So as you see, the server is loosing an specific session variable. Does the session variables has a maximum definition name, or in an application can you place a maximum set of variables?
Does the session variables has a maximum definition name, or in an application can you place a maximum set of variables?
Not usually - the session object is mainly a collection that stores references to objects by name. Is the object you are losing Serializable? If not the servlet engine may be losing it on serializing the session to disk. In that case you should see error reports in the logs. Which servlet engine are you using? Bill
Joined: Feb 23, 2004
I'm using WebSphere Application Server 4.x
I found other inusual thing. I am storing my session id in a database and it seems that on every page that I go within my applicaction (in the same window browser) seems to be changing. So I have a different session id for each page. It's seems to me that I'm loosing the session but I'm not sure what I could do for storying it...
Author and all-around good cowpoke
Joined: Mar 22, 2000
There is no good reason to store your session ID in a database - the servlet container is responsible for managing the session ID and it uses its own rules for where that ID is meaningful. I can think of the following possible reasons for getting different sessions during the same browser session: 1. code somewhere is forcing an existing session to be invalidated 2. the server does not consider all the parts of your application to be the same "web application" 3. your session timeout is set to a short duration and the container is timing it out. Bill
If you are getting a new session id from each page from the same user, in that case server is not able to understand that requests are coming from the same user. How server understands if the request is coming from the same user?
In the very first request, server creates new session object and while sending the response back to browser, it also sends the session id in the HTTP headers. If the cookies in the browers are enabled, this session ID comes back in the HTTP headers of next request. Server verifies this id with the already generated IDs. If there is no match of this id then it creates fresh or if there is matching then it returns the already created session object.
This problem can be solved by using URL re-writing. It appends the session id in each dyamic URL.