rsim/oracle-enhanced — Issue #125: OCIError: ORA-01000: maximum open cursors exceeded
Author: awd-switzerland
Created: 2011-11-15 13:52:01+00:00
State: open

We execute a lot of similar statements in an ETL process. After a few hundred updates on different entities we get the above error.
It seems the the number of cursors leak - means - cursors are not closed correctly.
Unfortunately I do not have a code snippet I can share to reproduce it.

The problem is as a workaround resolved by calling
ActiveRecord::Base.connection_handler.clear_all_connections!
every one and then (e.g. after processing 100 entities e.g.)

Our Setup:
Oracle 10g
Rails 3.1.1 (same on 3.1.2.rc2)
activerecord-oracle_enhanced-adapter (1.4.0)
ruby-oci8 (2.0.6)

DATABASE Config:
adapter: oracle_enhanced
database:
username:
password:
cursor_sharing: similar
nls_numeric_characters: ".,"