1

Maximum sessions that tomcat can handle? If that maximum session exceeds is there a possibility of an application crash? How can i handle that? I have set the initial ram memory as 1.5GB for tomcat. Suggestions and help?

5
  • I've seen a tomcat work well with 30 000 sessions, is that enough for you? It really depends how you will use it. If you store lots of data inside it, it may fill your JVM and crash with an OutOfMemory. Commented Feb 17, 2012 at 10:18
  • we're handling the sessions and invalidating it properly. But sometimes if we are trying to access the session variables we are getting those session variables as null without invalidating it?? Commented Feb 17, 2012 at 10:29
  • ok I see why you asked this question (and I have no solution to your problem). But I think you might be better off creating another question explaining your real problem, you might get a solution faster Commented Feb 17, 2012 at 10:34
  • I posted this question because, i thought that are some vulnerabilities in handling tomcat sessions which causes this problem...!!! Anyways thanks for your concern...:) Commented Feb 17, 2012 at 10:36
  • I see, but maybe you are wasting time here. How many sessions does your tomcat handle? I doesn't look like the root of your problem lies here. Commented Feb 17, 2012 at 10:51

1 Answer 1

1

I don't believe there's a hard limit; it's determined by the max # of simultaneous requests the box can handle, and that's up to memory, CPU, threads, etc.

And it's not just the max # sessions, it's the average amount of data per session and how long they last. It's not so simple.

You don't say if this is pre-emptive worrying or if you've crashed and need a fix. I'd look at your app and think carefully about what you keep in session.

Sign up to request clarification or add additional context in comments.

2 Comments

My application is a client application which uses a login/ logout process. On logout we are properly invalidating the sessions. We are storing values in sessions to access it during the application, But soemtimes when we are trying to access the session variables we are getting those session variables as "null"...??
Sounds like a possible lack of thread safety to me. That has nothing to do with insufficient resources.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.