2013/4/17 Toni Es Gras <servomac@gmail.com>
Hi everyone!

I'm trying to insert a lot of instances of a simple model. I'm using
django and oracle as a backend, with the ojdbc connector.
[...]
If the number of circumscriptions is to big, when i visit the desired
url that is handled by the upper view, i got a nice error about too
many cursors open

These bugs seem to be relevant:
https://code.djangoproject.com/ticket/14298
http://bugs.jython.org/issue1582 (supposedly fixed)

What this could mean is that Django is leaking the open database cursors without closing them, and because garbage collection does not happen right away in Jython (contrary to CPython) the cursors for the objects created in earlier iterations of the loop have not yet been closed, getting you above Oracle's limit if you are unlucky.

Other than trying to fix Django (bug #14298 has a patch attached, I am not sure whether this has been merged in), you might want to try running the garbage collector explicitely from time to time in this loop.

Do you notice any change adding java.lang.System.gc() in your loop?