Question

Recently my Oracle 9i database moved from one site to another and since then I have been having trouble using the thin JDBC driver to query it.

This database has always been offsite and connected to over a VPN - not terribly fast but workable. Since the move the query is sent to the database, the headers will probably come back and then stop. In the v$session my session is then "inactive" but the query is still listed as present. This will hang almost indefinitely - I've seen it go as long at 9 hours with no motion, rollback errors or anything.

When I switched from the JDBC driver for Oracle 11 to a Oracle 9 driver then the performance improved slightly. I have tried many of the 'behind firewall tips' on the Oracle website (connection string changes and JDBC properties) but to no avail.

One thing that did have an effect was changing the fetchRow size down to 1 - still brutally slow but some results could be gotten on some queries.

The queries are not intensive - even PK lookups fail with a table with 40 small text columns. Works fine on SqlPlus.

I am using Linux (centOS and Fedora), have tried JDK 7 and 8, thin JDBC drivers version 9, 11 and 12 and using SquirrelSQL, SQLWorkbench/J, SQLLine, groovy scripts and a grails ap all with the same results.

Was it helpful?

Solution

It turned out to have major packet loss at any normal volume which cause one of the acks/synacks to drop and hang the query indefinitely.

This was "resolved" through taking the MTU down to 600 (from a OS default of 1500). Rough compromise but is working.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top