title: GraphDB OutOfMemoryError: Java heap space
body: <p>I'm using GraphDb Free 8.6.1 in research project, I'm running it with default configuration on linux server having 4GB memory in total.</p>
  
  <p>Currently, we execute quite many CRUD operations in tripplestore.</p>
  
  <p>GraphDB throwed exception in console:</p>
  
  <pre><code>java.lang.OutOfMemoryError: Java heap space
  -XX:OnOutOfMemoryError="kill -9 %p"
  Executing /bin/sh -c "kill -9 1411"...
  </code></pre>
  
  <p>Looking into process, GraphDB runs with parameter  XX:MaxDirectMemorySize=128G</p>
  
  <p>I was not able to changed, even with ./graph -Xmx3g, process is still running with XX:MaxDirectMemorySize=128G.</p>
  
  <p>I've tried to configure ./grapdh parameter, setting the GDB_HEAP_SIZE=3072m, now process runs with additional -Xms3072m -Xmx3072m parameters, but remains XX:MaxDirectMemorySize=128G.</p>
  
  <p>After update to GDB_HEAP_SIZE=3072m, repository went down again without  .hprof file, no exception, nothing suspicious in logs. The following line was flushed into console: Java HotSpot(TM) 64-Bit Server VM warning: </p>
  
  <pre><code>Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f5b4b6d0000, 65536, 1) failed; error='Cannot allocate memory' (errno=12)
  </code></pre>
  
  <p>Please, can you help me to properly configure GraphDB tripplestore to get rid of the Heap Space exceptions?</p>
  
  <p>Thank you.</p>