Well, I found out why this was happening, but I can't find a solution.
There *is* a check in the connection pool code to test if a connection is valid before
returning it for use. The problem is that when the firewall kills a connection, any
test on
that connection to check if it's valid will just hang and eventually time out.
I have found that if I kill connections on the Oracle end, the connection validity
test works just fine (it throws an exception immediately). When this happens, I catch
the
exception and create a new connection. But when the connection is timed out in the
firewall's connection table, there seems to be no way to test the connection without
hanging.
I have tried using conn.commit(), conn.createStatement(), and others, as the method
for testing to see if the connection is valid. The obvious choice would be to use
conn.isClosed(). But this seems to return False when the connection is bad!
Any ideas on how to test a connection without hanging?
> -----Original Message-----
> From: Boemio, Neil (CAP, FGI)
> Sent: Saturday, March 31, 2001 10:36 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: JRun/Oracle/Firewall
>
> I found out some information from a firewall guy. It looks like it's a firewall
>issue:
>
> Yes, that's probably what's happening. The firewall maintains a connection table
>for all established connections (this applies to tcp only). The session time-out is
>currently
> set for 3600 seconds (1 hour). This is the default setting. We can increase up to
>7200 seconds (2 hours) fairly easily. I believe that in order to go beyond the 2
>hour limit,
> we need to tweak firewall parameters you normally don't want to play with, which may
>also require a firewall reload. At any rate, even if we can do this, I'm not sure
>that it's
> a good idea. If we fill the connection table with dormant connections, we could
>wreak havoc on all users, perhaps even require a system reboot. Of course, we could
>extend the
> size of the connection table, but this means playing with more parameters you
>normally don't want to touch.
>
> -----Original Message-----
> From: Boemio, Neil (CAP, FGI)
> Sent: Friday, March 30, 2001 3:52 PM
> To: '[EMAIL PROTECTED]'
> Subject: JRun/Oracle/Firewall
>
> I have a very puzzling problem. I'm using JRun 2.3.3 Build 157 to connect to
>an Oracle 8.1.6 database.
> I'm using connection pooling and it seems that when my site is idle for
>sometime (maybe an hour or so), I cannot load any JSP pages that connect to Oracle.
>Static HTML
> pages and JSP pages that do NOT connect to Oracle are just fine.
>
> Restarting JRun always fixes the problem. But I've also noticed that if I
>kill the Oracle connections and then refresh the browser, I can connect again.
> At first I was using my own custom database connection pool and I thought it
>might be something I coded wrong. So I switched to a connection pool I downloaded
>from
> http://www.webdevelopersjournal.com/columns/connection_pool.html, but the problem
>still occurs.
>
> It almost seems like the connections or something else in JRun is timing out
>after some time of inactivity.
> Another confusing part is that this same setup on my current web hosting
>provider works fine. We are moving to a different provider now and that is where the
>problem is
> happening with the same exact code.
> Could a difference in the environment be any cause? Any ideas as to where to
>look?
>
> Thanks,
> Neil
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists