cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Relation between tomcat worker balancer page and active sessions

Highlighted
Newbie

Relation between tomcat worker balancer page and active sessions

Hi,

I have couple of concerns regarding active sessions ..

we have cl;uster environment having 2 slave and load balancer is set up on one of the salve machine.

1) from past one week we have seesing activession parameter on serverstatus page in RED color. and the count is is high it is aroung 800 to 1000

what could you pleasec ause for this ??

how to resolve this ?/

I suppose it is possible to increase the base of the activesessions parameter but on what basis it is has to be increase ?? is there any calculation for it ??

2) in Load balcer setup , we have 6 tomcat workers setup, 3 on each slave nodes.

when I see the load balncer status page ( workerstatus page ) I see parameter called "Max" which incdicates "Maximum busy connection"

is there any logical relationship between Activession son serverstatus page and this Max busy connection worker status page ...

is active session == sum of all workers maximum busy connectoiosn ??

4 REPLIES 4

Re: Relation between tomcat worker balancer page and active sessions

As far as your active session count is concerned, you first need to ask yourself whether this is reasonable given your environment. In other words, is it reasonable to expect that a single one of your Tomcats has 800 to 1000 active users? What is the active user count on the server status page at this point.

It is quite easy to get ridiculous session counts in some cases:

  • You have some client, e.g. a load test, that makes numerous requests that each establish their own session. The proper thing to do here is either (1) carefully avoid establishing a session in the server-side handling of such requests or (2) ensure that your client continues re-using sessions rather than creating new ones. #2 is critical in any load test and involves configuring a proper cookie handler to retain a session between requests that are logically part of the same user session.
  • You have some load balancing component that is not obeying session affinity (e.g. due to a misconfiguration) and thus is sending requests to a Tomcat other than that where its session is established, resulting in a new session being produced upon each such improper load balancing event.

As for changing the active sessions threshold, that's done via the wt.servlet.SessionMonitor.MaxAverageActiveSessionsThreshold config-param in web.xml.

As for your second question, I'm not sure what you really have going on here. You have a cluster, which normally would mean a hardware load balancer at the cluster level and then Apache plus mod_jk or mod_proxy_ajp (depending on the Windchill version) balancing between Tomcats on any given node. Yet you seem to be implying that you have an Apache doing the cluster-level load balancing. You don't state whether this is mod_jk or mod_proxy_ajp, nor which Windchill version this is.

Re: Relation between tomcat worker balancer page and active sessions

Thanks for responding to my request ...

whenever, we have 1000+ active session acount .. total active user count would be aroun120 to 140 users.

we use Apache -Tomcat software load balancing.

we are working on windchill 10.2 M010.

after a certain time .. say 1 or 2 day .. performence is getting affected .. does active sessions could be cause for this ??

Re: Relation between tomcat worker balancer page and active sessions

It sounds like you have a substantial problem with inappropriate session creation due to one of the causes noted above that you'll need to track down.

If you're using Apache software load balancing across a cluster, then this configuration is not automated for you and you're on your own to get a lot of details right. You may well have gotten one or two wrong along the way.

Are you load balancing from 1 Apache at the cluster level directly to each Tomcat? Or from an Apache at the cluster level to an Apache on each cluster node?

As for whether the extra sessions could be causing a performance issue, that's possible. I'd not expect the session lookup performance to be greatly impacted (as a lookup in a Map containing 1000 entries shouldn't be terribly slow), but rather see issues in other areas, e.g. heap memory usage.

Re: Relation between tomcat worker balancer page and active sessions

Are you load balancing from 1 Apache at the cluster level directly to each Tomcat? Or from an Apache at the cluster level to an Apache on each cluster node?

Ans:

1 Apache on one slave node passing request to tomcat of both the nodes ..

we have totaly 6 tomcat workers 3 on each node .

we have 2 Slave nodes and 3 MS on each node .. and each MS on each node has 800 to 1000 number of Active sessions.

Heap size seems to much withing the the limit ..