You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lea <le...@sminet.co.uk> on 2003/04/22 22:53:35 UTC

tomcat + h/w load balancer problem

Hi

I have a problem where my load balancer (cisco) checks availability of my dynamic web pages on tomcat by checking a specific URL for certain text. The LB checks every 1 minute and the problem I have is that it creates a new session on every request.

After 2 days Tomcat dies due to lack of memory/with too many users, ie. many sessions created by the load balancer.

Is there anyway that tomcat can be configured to ignore the load balancer (maybe by its IP) and either not create a new session for it, destroy the session immediately, or by maintaining a single session for the LB?

Any suggestions or help would be appreciated,

Thanks

Lea

Re: tomcat + h/w load balancer problem

Posted by Lea <le...@sminet.co.uk>.
Thanks. That was what I was thinking but thought there might be a way off
doing it directly in Tomcat.

Cheers
Lea

----- Original Message -----
From: "Tim Funk" <fu...@joedog.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, April 23, 2003 12:00 AM
Subject: Re: tomcat + h/w load balancer problem


> You can do either of the following:
> - Make your test page  (heartbeat) a servlet which does not create a
session.
> - add <%@page session="false"%> to your jsp page and a session won't be
created.
>
> The problem is it doesn't test your "real" pages but if your test page
> simulates all the resources you need - that shouldn't be an issue.
>
> OR ... on your heartbeat pages - add extra code to detect that it is the
> loadbalancer performing a check and do a session.invalidate() at the end
of
> the page.
>
> -Tim
>
> Lea wrote:
> > Hi
> >
> > I have a problem where my load balancer (cisco) checks availability of
my dynamic web pages on tomcat by checking a specific URL for certain text.
The LB checks every 1 minute and the problem I have is that it creates a new
session on every request.
> >
> > After 2 days Tomcat dies due to lack of memory/with too many users, ie.
many sessions created by the load balancer.
> >
> > Is there anyway that tomcat can be configured to ignore the load
balancer (maybe by its IP) and either not create a new session for it,
destroy the session immediately, or by maintaining a single session for the
LB?
> >
> > Any suggestions or help would be appreciated,
> >
> > Thanks
> >
> > Lea
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: tomcat + h/w load balancer problem

Posted by Tim Funk <fu...@joedog.org>.
You can do either of the following:
- Make your test page  (heartbeat) a servlet which does not create a session.
- add <%@page session="false"%> to your jsp page and a session won't be created.

The problem is it doesn't test your "real" pages but if your test page 
simulates all the resources you need - that shouldn't be an issue.

OR ... on your heartbeat pages - add extra code to detect that it is the 
loadbalancer performing a check and do a session.invalidate() at the end of 
the page.

-Tim

Lea wrote:
> Hi
> 
> I have a problem where my load balancer (cisco) checks availability of my dynamic web pages on tomcat by checking a specific URL for certain text. The LB checks every 1 minute and the problem I have is that it creates a new session on every request.
> 
> After 2 days Tomcat dies due to lack of memory/with too many users, ie. many sessions created by the load balancer.
> 
> Is there anyway that tomcat can be configured to ignore the load balancer (maybe by its IP) and either not create a new session for it, destroy the session immediately, or by maintaining a single session for the LB?
> 
> Any suggestions or help would be appreciated,
> 
> Thanks
> 
> Lea


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: tomcat + h/w load balancer problem

Posted by Filip Hanik <ma...@filip.net>.
you need to set your sessions to expire in the web.xml file.
they loadbalancer doesn't keep the sessions alive, the browser should do
that be reissueing new requests


Filip

> -----Original Message-----
> From: Wellinx [mailto:bricker@wellinx.com]
> Sent: Tuesday, April 22, 2003 2:06 PM
> To: Tomcat Users List; Lea
> Subject: RE: tomcat + h/w load balancer problem
>
>
> An obvious thing would be for it to call a page that explicitely kills the
> session after returning something to the LB?
>
> Not a programmer, so I cannot begin to tell you how to do that...
>
> Ben Ricker
> Wellinx.com
>
> -----Original Message-----
> From: Lea [mailto:lea@sminet.co.uk]
> Sent: Tuesday, April 22, 2003 3:54 PM
> To: tomcat-user@jakarta.apache.org
> Subject: tomcat + h/w load balancer problem
>
>
> Hi
>
> I have a problem where my load balancer (cisco) checks availability of my
> dynamic web pages on tomcat by checking a specific URL for
> certain text. The
> LB checks every 1 minute and the problem I have is that it creates a new
> session on every request.
>
> After 2 days Tomcat dies due to lack of memory/with too many
> users, ie. many
> sessions created by the load balancer.
>
> Is there anyway that tomcat can be configured to ignore the load balancer
> (maybe by its IP) and either not create a new session for it, destroy the
> session immediately, or by maintaining a single session for the LB?
>
> Any suggestions or help would be appreciated,
>
> Thanks
>
> Lea
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: tomcat + h/w load balancer problem

Posted by Wellinx <br...@wellinx.com>.
An obvious thing would be for it to call a page that explicitely kills the
session after returning something to the LB?

Not a programmer, so I cannot begin to tell you how to do that...

Ben Ricker
Wellinx.com

-----Original Message-----
From: Lea [mailto:lea@sminet.co.uk]
Sent: Tuesday, April 22, 2003 3:54 PM
To: tomcat-user@jakarta.apache.org
Subject: tomcat + h/w load balancer problem


Hi

I have a problem where my load balancer (cisco) checks availability of my
dynamic web pages on tomcat by checking a specific URL for certain text. The
LB checks every 1 minute and the problem I have is that it creates a new
session on every request.

After 2 days Tomcat dies due to lack of memory/with too many users, ie. many
sessions created by the load balancer.

Is there anyway that tomcat can be configured to ignore the load balancer
(maybe by its IP) and either not create a new session for it, destroy the
session immediately, or by maintaining a single session for the LB?

Any suggestions or help would be appreciated,

Thanks

Lea


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org