You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by simmi iyer <si...@yahoo.com> on 2005/07/13 14:22:51 UTC

Cursors

Using network client driver to connect to network
server.

Using java threads to run parallel selects. RAM used
goes up and after some time Network server throws "Out
of Memory" error.

Obviously the cursors at database end are not getting
closed when ResultSet is closed at the client end java
code.

I understand from Derby docs that cursors by default
get closed when  a commit is done on connection. Is
there any other way of closing the database cursors?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Cursors

Posted by Kathey Marsden <km...@sbcglobal.net>.
Satheesh Bandaram wrote:

>If closing ResultSets and Statements don't release memory, I think, that would 
>be a bug. If you have a repro, I would file a bug in Jira and attach a test case.
>
>Satheesh
>
>  
>
>simmi iyer wrote:
>
>>What I mean is ResultSet.close() in java is not
>>closing the cursors at database end. Because of that
>>RAM utilized keeps on increasing and at some point of
>>time "Out of Memory" error occurs.
>>
>  
>
I don't know of a problem with ResultSets, but for network server,
DERBY-210 is an issue for prepared statements.
http://issues.apache.org/jira/browse/DERBY-210

I added a comment to the bug on how to workaround this issue.

Kathey




Re: Cursors

Posted by simmi iyer <si...@yahoo.com>.
What I mean is ResultSet.close() in java is not
closing the cursors at database end. Because of that
RAM utilized keeps on increasing and at some point of
time "Out of Memory" error occurs.

As per Derby docs, cursors get closed at connection
commit. Is there a way to close cursors before commit?

thx

--- Daniel John Debrunner <dj...@debrunners.com> wrote:

> simmi iyer wrote:
> 
> > Using network client driver to connect to network
> > server.
> > 
> > Using java threads to run parallel selects. RAM
> used
> > goes up and after some time Network server throws
> "Out
> > of Memory" error.
> > 
> > Obviously the cursors at database end are not
> getting
> > closed when ResultSet is closed at the client end
> java
> > code.
> > 
> > I understand from Derby docs that cursors by
> default
> > get closed when  a commit is done on connection.
> Is
> > there any other way of closing the database
> cursors?
> 
> Maybe I'm not understanding what exactly you mean,
> but can you just call
> the close method? java.sql.ResultSet.close().
> 
> Dan.
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Cursors

Posted by Daniel John Debrunner <dj...@debrunners.com>.
simmi iyer wrote:

> Using network client driver to connect to network
> server.
> 
> Using java threads to run parallel selects. RAM used
> goes up and after some time Network server throws "Out
> of Memory" error.
> 
> Obviously the cursors at database end are not getting
> closed when ResultSet is closed at the client end java
> code.
> 
> I understand from Derby docs that cursors by default
> get closed when  a commit is done on connection. Is
> there any other way of closing the database cursors?

Maybe I'm not understanding what exactly you mean, but can you just call
the close method? java.sql.ResultSet.close().

Dan.