views:

704

answers:

1

I know with some connection pools, you can specify a test query the pool manager can use to validate a connection.

Is there anything similar to that for asp.net? I'm having a problem where there's a firewall between the web app and the database, and it's closing idle connections - the result is that the user gets an "ORA-03135: connection lost contact" error. Reloading the page is fine, but I'd like to remove that error completely.

A: 

If the latest Oracle driver hasn't fixed the problem, the ugly solution is to build a Windows Service that pings the database every X seconds. I'm not sure what X would be, I'm guessing every 30 seconds.

Josh
That wouldn't help, I'm afraid. There's a pool of database connections, and as far as the .net pool manager knows they're all fine. Except along comes the firewall, and says to a connection "You're not working, I'll just kill you off". So meanwhile the pool manager hands off the connection to the next page that asks for it, except that connection is dead.Pinging the db wouldn't help, because Mr. Firewall is still gonna kill that idle connection.I've seen other pool implementations that periodically test the connections, or have a param to recycle them - that's what I'd like.
chris