You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "John H. Embretsen (JIRA)" <de...@db.apache.org> on 2006/08/17 12:52:14 UTC

[jira] Commented: (DERBY-1713) Memory do not return to the system after Shuting down derby 10.2.1.0

    [ http://issues.apache.org/jira/browse/DERBY-1713?page=comments#action_12428625 ] 
            
John H. Embretsen commented on DERBY-1713:
------------------------------------------

Once you get an OutOfMemoryError, you cannot expect your JVM to function properly. OutOfMemoryError is a subclass of java.lang.VirtualMachineError, which JavaDoc says:

"Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating."

So the fact that memory is not freed when you try to shut down Derby after getting the OutOfMemoryError is probably not a bug. However, the fact that you do run out of memory when executing a SELECT count(*) statement sounds like a serious bug to me... 

It would probably help if you could submit a test case (small java program) reproducing the error.


> Memory do not return to the system after Shuting down derby 10.2.1.0
> --------------------------------------------------------------------
>
>                 Key: DERBY-1713
>                 URL: http://issues.apache.org/jira/browse/DERBY-1713
>             Project: Derby
>          Issue Type: Bug
>          Components: Performance
>    Affects Versions: 10.2.0.0
>         Environment: Windows XP SP2
> JRE 1.6 beta2
>            Reporter: Ibrahim
>            Priority: Critical
>
> 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