[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1261
  • Last Modified:

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

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
for_yan
Asked:
for_yan
  • 3
  • 3
1 Solution
 
objectsCommented:
why do you think the size of the session is causing it to return null?
0
 
for_yanAuthor Commented:
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
 
objectsCommented:
test it on a recent version of tomcat to see if you get the same behaviour
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
for_yanAuthor Commented:
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
 
objectsCommented:
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
 
for_yanAuthor Commented:
Yes, unfortunately that is probably what I'll have to do.
 Thanks.
0
 
Kevin CrossChief Technology OfficerCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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