james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Problems using Derby for stores
Date Sun, 13 Nov 2005 03:52:50 GMT
jta wrote:

> 1) What version of derby is being used? Posting the output
> from this command would be the most helpful:
> java org.apache.derby.tools.sysinfo

  $ java -classpath derby.jar org.apache.derby.tools.sysinfo
  ------------------ Java Information ------------------
  Java Version:    1.4.2_09
  Java Vendor:     Sun Microsystems Inc.
  Java home:       /usr/java/j2sdk1.4.2_09/jre
  Java classpath:  derby.jar
  OS name:         Linux
  OS architecture: i386
  OS version:      2.6.9-22.0.1.EL
  Java user name:  noel
  Java user home:  /home/noel
  Java user dir:   /home/noel/ASF/james/server/trunk/lib
  java.specification.name: Java Platform API Specification
  java.specification.version: 1.4
  --------- Derby Information --------
  JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
  [/home/noel/ASF/james/server/trunk/lib/derby.jar] - (208786)
  ----------------- Locale Information -----------------

I have also tested this on other versions of linux, but that's the one on
which I had generated the problem.

> 2) Which jdbc driver is being used?

See our config file.  The only entry is:


I assume that answers the question, and that we are using the embedded
driver version of Derby.  Should we be doing things differently?  How do we
ensure that Derby gets shutdown cleanly, or at least can do what it needs to
do to ensure that the database does not get corrupted by some other program

The problem is documented here:


djd wrote:

> It may be that the Derby page cache is too big for this memory size.

Looking at our setup, the default for JAMES doesn't specify memory
parameters when starting the JVM, although users can specify them if they
want.  Therefore:

  public class props
    static public void main(String[] args)
      System.out.println("Free Memory: " +
      System.out.println("Total Memory: " +
      System.out.println("Max Memory: " + Runtime.getRuntime().maxMemory());


  Free Memory: 1899704
  Total Memory: 2031616
  Max Memory: 66387968

in our default configuration.  That's been fine for JAMES, even in
production on my servers (we limit messages to 5MB maximum).  So how much
more need to allot due to Derby being embedded?

> By default the page cache is 1000 pages, and the default page size is 4k.
> However I would guess with James that the default page size is 32k, as
> it increases for tables with BLOBs/CLOBs or long rows. Thus the page
> cache is much bigger when using BLOBs etc.
> You can try bumping the page cache size down,
> derby.storage.pageCacheSize=100
> http://db.apache.org/derby/docs/10.1/tuning/rtunproper81359.html

So just -D it when launching JAMES?

	--- Noel

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message