Re: Very Very Slow performance of Tomcat - Connection Pool Dies

2004-02-20 Thread Ankur Shah
Harry Mantheakis wrote:

If your firewall drops idle connections after some time, you will need
to tune a couple of settings.
   

In your sysctl settings for the Apache machine, set your tcp keepalive
time to a value lower than the drop time of your firewall.
   



I have a very strict firewall policy on my Linux box - using iptables. Only
port 80 packets get through. Nothing else.
Does that have something to do with my problem? Is there an ICMP port that I
need to open up?
 

It does sound more like a firewalling issue. I'd doubt its the iptables, 
though, unless you have squid running on your Linux box ? Also, do you 
connect to the Oracle DB through VPN or another secure link? I know of 
many corporate VPN servers, Proxies set up by default to drop 
connections inactive for a specific amount of time, which is more or 
less what you're seeing.

To corroborate this, I would set up a simple TCP server on the Linux box 
with an open connection to the Oracle backend and leave it open and see 
if I'd get similar results.

-- A

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Very Very Slow performance of Tomcat - Connection Pool Dies

2004-02-20 Thread Harry Mantheakis
Hi Antonio

I'm going to try and hijack this thread if I may (!) because, as you say...


> Otherwise, you will bang your head against a wall. And that causes
> headache ;-)


And I *do* have a headache with a problem that might be related to what you
are talking about.

Basically, I have deployed the *same web application* on two different
machines running Tomcat, both of them connecting to the *same remote
database* using the usual JNDI connection pooling mechanism.

One Tomcat server runs on a Windows 2000 machine, and it sits next to the
box that runs the Oracle database. The Oracle DB box has its own static IP
address.

The other Tomcat server runs on a Red Hat 9 machine at my home. It connects
to the above Oracle DB box - far away - using the same static IP address.

Now, the DB connections on the Windows server are *always* available, even
after long periods of inactivity. IOW the DBCP connection pooling works
fine. I can log in at 4.00 am in the morning, and the connections respond
immediately.

The problem is with the the DB connections on my own RH9 server - they just
*die* after a period of inactivity :-(

That period of inactivity can be as little as half and hour.

On my machine, I have to 're-establish' the connection pooling by making a
login request, waiting for about a minute, and then starting a *new* login
request. Then it works until the next period of inactivity.

BTW - the 'first' login attempt (which reactivates the connection pooling)
never gets a response - it just times out.

Do you think you can shed any light on this? I have read just about every
single forum discussion - from Tomcat-User to Commons DBCP to you-name-it,
and I just cannot find the answer.

You also wrote:


> If your firewall drops idle connections after some time, you will need
> to tune a couple of settings.

> In your sysctl settings for the Apache machine, set your tcp keepalive
> time to a value lower than the drop time of your firewall.


I have a very strict firewall policy on my Linux box - using iptables. Only
port 80 packets get through. Nothing else.

Does that have something to do with my problem? Is there an ICMP port that I
need to open up?

I shall be very grateful for any help you can offer, and thank you for your
time so far.

Kind regards

Harry Mantheakis
London, UK









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]