OCI/Oracle and too many connections?

Hi,

I have a RoR app which uses an existing Oracle database. It has its
own user/schema which uses Rails conventions for naming. The data are
extracted from another schema into views so that we can use these
conventions.

The problem is that it intermittently throws an
ActiveRecord::StatementInvalid when trying to update data in the
application. It seems to be a problem with how the oci adapter handles
the date format; however, all the data are cleaned up using callbacks
and validated before submission.

The problem seems most prevalent when there are more people using the
application (but even at its maximum it would be no more than 30 -- it
is a CRM application for clients of our company to view/update data
that we maintain for them), which leads me to my question:

Is anyone aware of any problems with OCI/Oracle adapter maintaining
multiple connections for the same (Oracle) user (schema)?

I am using Rails 1.1.6/Ruby 1.8.4. We have another application which
uses the same versions and does not seem to have this problem.

Cheers,
Matt

Yes, under any serious load the ruby-oci8 driver is buggy for me.
I've experienced threadlocks and other random issues when using it the
past few months. No real solution to speak of, we just threw more
hardware at it. It's working for now.

check your oracle dbms setting for max_cursors or something like that. Increase it if possible. Something like 300 is a good number. IIRC the default value is too low. This was a problem for me with some Java stuff too. Not saying it’s the answer but it might help.

Thanks but that's not it. My max cursors is already set to 300. And
my highest opened count isn't anywhere near that:

select max(a.value) as highest_open_cur, p.value as max_open_cur
from v$sesstat a, v$statname b, v$parameter p
where a.statistic# = b.statistic#
and b.name = 'opened cursors current'
and p.name= 'open_cursors'
group by p.value;

HIGHEST_OPEN_CUR MAX_OPEN_CUR
---------------- ------------
            53 300

Likewise. My max_open_cur is already at 300 also, and the
highest_open_cur no higher than 70 on any of our dbs.