Solved

Is there still a limit on the size of Tomcat session object?

Posted on 2011-03-18
8
1,101 Views
Last Modified: 2012-06-22
I am running servlets on very old version of Tomcat (3.3) on Solaris 8 server.
It worked well for me for many years.
Now I encountered the situation when one of my session objects which I use to pass stuff from one
servlet  to the next one happened to be unusually big (nothing dramatic - I guess all of it is in megabytes
and maybe just a few megabytes - no comparison with about 1 GB memory I allocate to running Tomcat; I don't have many users/sessions either). What happens - with this big session size the second page cannot get hold of session object - it returns null,
as if there would not be any session before or as if  session expired (in fact it cannort expire, as I do it very quickly).
Strange thing is that this is definitely session object size related. If I use the same servlet but read in a little bit less data - then it passes
session information to the next page without any problem. Everywhere it is written that Tomcat does not
have limit on individual session size, but it looks like that this is what I observe.
Did anyone see similar things with Tomcat (perhaps with the old one)?.
Is there a way to influence it? I already increased -Xmx on Tomcat start to 1300m from 700m I used
before this situation, but it didn't help.
0
Comment
Question by:for_yan
[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
8 Comments
 
LVL 92

Expert Comment

by:objects
ID: 35169908
why do you think the size of the session is causing it to return null?
0
 
LVL 47

Author Comment

by:for_yan
ID: 35169937
This servlet collects some number of records - allows the user to do something with them
and then passes on to the next servlet which stores the records back to the DB.
Alll these years I had a few dozens records and all worked fine.
Now it happnes that they have more than a hundred records (never happened before) and
when I try to get the session object in the second servlet it returns null to me.
If i modify parametsers of the first servlet, so that it reads in say about 90 records, then
everything works fine and normal session object is returned.

I have several applications runnsing in more or less similar way (but with smaller session objects)
on the same Tomcat and all other applications run without problems.
My first thought was that I didn't restart Tomcat for many months and something
got wrong. But now i restarted it several times, increased the heap
and still observe the same situation.
All these servlets worked in the same way for long time, were not
changed recently - and the only thing different today, is that we have
unnaturally long list of records to process.

All these records are by no means comaparable to any gigabytes, i don't
thing all these recirds together woyld even take a meg

   
0
 
LVL 92

Expert Comment

by:objects
ID: 35169965
test it on a recent version of tomcat to see if you get the same behaviour
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 47

Author Comment

by:for_yan
ID: 35169991
I do have a backup system with Tomcat 6.0 and it does work on that system.
But frankly I'm reluctant to move the whole operation there as I have everything much better
tested and used on the old one, and although I was trying to keep it all in sync on the newer
version, I can not be quite sure of it.

Now that I realized, that it is size related, I do have a fallback strategy (even before I start seriously thinking of moving all my stuff to Tomcat 6)
 to teach the users (I don't have a hundred of them - just 2-3 people), in such case, when they accumulated
so many records, which happens extremely rarely, - to do it stepwise and read in at first less
 records and then close some of them, after which
it should operate as before, as the total number of records will become less than 100.
Still, if I find the way to overcome it in a way transparent to users, that would be very nice.

0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 35170385
that would suggest its a bug in tomcat 3.3 so not a lot you can do (besides limiting what is stored in the session)
0
 
LVL 47

Author Comment

by:for_yan
ID: 35170388
Yes, unfortunately that is probably what I'll have to do.
 Thanks.
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 36935154
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
login jsp example 24 102
Unhandled exception type Exception 18 64
Java basic valueOf question 1 50
Read CLOB data from Oracle using JAVA 3 39
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

737 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