Resending to the list:
On Sep 4, 2012 11:44 AM, "Ian Kelly" <ian.g...@gmail.com> wrote:
>
> On Mon, Sep 3, 2012 at 6:14 AM, Shai Berger <sh...@platonix.com> wrote:
> > On Wednesday 29 August 2012 22:17:22 Ian Kelly wrote:
> >>
> >> https://github.com/ikelly/django/commit/086f502a1c2acb9db27531f7df78cb9df9a
> >> b83bd
> >>
> > I've run a version based on this -- basically, porting the patch to Django 1.3
> > which we use (so, no tzinfo), using "float" as the default for expressions, and
> > putting the whole thing as a derived class from the original adapter rather
> > than a patch (because that's what we do here, as we also need named parameters
> > and we had to add them). I found that it leaks something -- the error says
> > "cursors", but I suspect something more subtle; either way, this is what I got
> > from a page which makes several hundred queries (don't ask):
>
> Are these ORM queries or custom queries? If the latter, are you
> explicitly closing the cursors? That should help prevent the issue,
> although unfortunately the ORM doesn't do this. The cursors should be
> closed anyway when they're finalized, but maybe we've got a reference
> cycle preventing them from getting cleaned up right away, and too many
> are accumulating between garbage collection passes.
>
> When I've seen this error in the past, the immediate solution has been
> to increase the OPEN_CURSORS parameter in the database. See:
>
> http://www.orafaq.com/wiki/ORA-01000
>
> Cheers,
> Ian
While preparing the patch, I ran into the inspectdb regression test suite;
this suite includes, among other things, a model with a database column named
'prc(%) x', which breaks test database creation on Oracle on current trunk. I
intend to include a fix for this (in a separate commit, of course) in the first
part as well (doubling percent signs in quote_name()).