db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ibrahim (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1713) Memory do not return to the system after Shuting down derby, following an out of memory event
Date Wed, 30 Aug 2006 10:13:24 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1713?page=all ]

Ibrahim updated DERBY-1713:

    Attachment: Test1.java

I simulated the problem exactly. I attached the code file [replace it with the one in the
previous attachment].
I found very strange behavior. It occurs in very specific situation.
The problem of not freeing the memory happens when calling a class which contains db connection
part [if you call the statements directly in the class, the freeing process will work]. The
SQL statements play a role also. The SQL statement that causes the problem contains long WHERE
clause that changes dynamically, but this in its own will not cause a problem unless it comes
after another statement  [SELECT count(*) ... ].
In summary, If I make any change in the SQL format or its place or .... , the freeing process
works perfectly except the case that I attached.
Please run the code and check  it's memory behavior. I'm not sure if it will work with you
in the same way that it works with me. Also I'm not sure what is the problem.
Please check if this is really a bug.

> Memory do not return to the system after Shuting down derby, following an out
of memory event
> ------------------------------------------------------------------------------------------------------
>                 Key: DERBY-1713
>                 URL: http://issues.apache.org/jira/browse/DERBY-1713
>             Project: Derby
>          Issue Type: Bug
>          Components: Performance
>    Affects Versions:
>         Environment: Windows XP SP2
> JRE 1.6 beta2
>            Reporter: Ibrahim
>            Priority: Critical
>         Attachments: test.zip, Test1.java
> I face a problem when querying large tables. I run the below SQL and it stuck in this
query and throws java heap exception OutOfMemory:
> SELECT count(*) FROM <table> WHERE .....
> N.B. I'm using a database of more than 90,000 records (40 MB). I set the maxHeap to 32
MB (all other settings have the default value, pageCache ... etc ). 
> Then, I shutdown the database but the memory is not returned to the system (and remain
32 MB [max threshold]). I tried to increase the maxHeap to 128 MB in which it works and releases
the memory, so I think the problem is when it reaches the maxHeap then it seems to not respond
to anything such as closing the connection or shutting down the database. How can I get rid
of this? (because i cannot increase the maxHeap as the database increases, I want to throw
an exception and release the memory)
> I'm using this to shutdown the DB:
> try{DriverManager.getConnection("jdbc:derby:;shutdown=true");}
> catch(SQLException ex){System.err.println("SQLException: " + ex.getMessage());}
> I'm using a memory Profiler for monitoring the memory usage.
> Thanks in advanced.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message