Closed pascalbetz closed 6 years ago
Check Oracle client and Database trace files (search for 'ADR'). Memory or resource issues? Network Issues?
@pascalbetz Could you confirm the Oracle client version by the following script just to make sure?
require 'oci8'
puts OCI8::oracle_client_version
Could you run the SQL statement without hangs on sqlplus when SQLNET.RECV_TIMEOUT
is in sqlnet.ora?
Create $HOME/.sqlnet.ora
, $TNS_ADMIN/sqlnet.ora
or $ORACLE_HOME/network/admin/sqlnet.ora
containing the following.
SQLNET.RECV_TIMEOUT=300
And then execute sqlplus.
$ sqlplus ...
SQL> select * from sometable;
@cjbj, @kubo thanks for the suggestions. Will do that on monday. I don't have access to the DB right now. Enjoy the weekend.
Quick status update:
require 'oci8'
puts OCI8::oracle_client_version
confirms the client version: 12.1.0.2
Something I did not describe properly (but I hope does not make a difference): i'm querying a View, not a Table. The receive timeout is 500s because it takes quite some time to build this view (first row is usually after 300s) The view is about 120k rows and 100columns. With some CLOBs and large varchar fields. It seems that I can fetch more rows when selecting fewer columns and vice versa before it hangs.
I tried with sqlplus and this fails as well. Also I tried and tested with ruby-oci8 from a local Docker container (had to tunnel the DB access through several hosts, which slowed it down a bit) and this worked as well. So I guess it is not related to ruby-oci8. Thanks for the suggestion to check with sqplus directly. I'll keep on investigating network and other resources in the deployment docker env.
Since this is not a problem of ruby-oci8 I'm closing this. Thanks for your help!
@kubo FYI:
I've downgraded to client 11.2 and this seems to work. If someone can give any pointers how I could get it running with latest client i'd be grateful. I'll report back here if I find anything new.
I've got some troubles reading from an Oracle DB using ruby-oci8 I have following code:
After reading some hundred rows this blocks inside the
exec
block. And after the 300s i get:Im using
Any Ideas how I can track this further?