Maybe connect up with jvisualvm to the process and see what it is reporting. Jvisualvm will show the environment of the process. Since you are specifying both a -Xmx and -Xms, the heap should be initially allocated to your 6G and never grow or shrink. Jvisualvm will show if that is it is doing so.
It seems strange that it is requiring so much memory. Yes your row count is high but I have tables in my database that are regularly 10M records that are queried every 5 minutes with no issue and I can do so with a much smaller memory setting (4G is what I am using in testing). Derby can work in an environment like this as one system that we have has tables that are inserted into about 10M records/day with no issues. -----Original Message----- From: Chris Olver [mailto:chris.ol...@3plearning.com] Sent: Thursday, June 05, 2014 11:42 PM To: Derby Discussion Subject: RE: Apache Derby - Locks up. Just before it locked up, I managed to get this: --- Derby Network Server Runtime Information --- ---------- Session Information --------------- Session # :4 Database :etl User :a # Statements:1 Prepared Statement Information: Stmt ID SQLText ------------- ----------- SYSLH0001 SELECT * FROM APP.PROFILES Session # :19 ------------------------------------------------------------- # Connection Threads : 2 # Active Sessions : 2 # Waiting Sessions : 0 Total Memory : 3042443264 Free Memory : 153934376 So I'm not sure what heap size it is reaching. Regards, -Chris -----Original Message----- From: Bryan Pendleton [mailto:bpendleton.de...@gmail.com] Sent: 06 June 2014 12:32 To: Derby Discussion Subject: Re: Apache Derby - Locks up. It's interesting that you are trying to set it to use 6 G, and yet in your other message there was the line: > Total Memory : 1756889088 Free Memory : 306272128 which seems to indicate that it's only using 1.7 GB. Like maybe you're running a 32 bit JVM, not a 64 bit JVM, somehow? bryan