Solved

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

Posted on 2011-03-18
8
1,066 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
  • 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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 59

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Suggested Solutions

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

856 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