james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Charles <eric.char...@u-mangate.com>
Subject JPAStressTest with derby, h2 and mysql
Date Sat, 01 May 2010 06:49:12 GMT

I just tested the JPAStressTest (for IMAP-137 JPA fails to persist 
MailboxMembership Entity on heavy load) Norman committed yesterday.

I made some tests towards derby (memory and embedded) , h2 (memory and 
embedded) and mysql with following configs (and adding the needed jdbc 
drivers in pom.xml):

         // Derby Memory

         // Derby Embedded
//        properties.put("openjpa.ConnectionDriverName", 
//        properties.put("openjpa.ConnectionURL", 

         // H2 Memory
//        properties.put("openjpa.ConnectionDriverName", 
//        properties.put("openjpa.ConnectionURL", 

         // H2 Embedded
//        properties.put("openjpa.ConnectionDriverName", 
//        properties.put("openjpa.ConnectionURL", 

//        properties.put("openjpa.ConnectionDriverName", 
//        properties.put("openjpa.ConnectionURL", 

I first changed the maximum number of messages from 1.000 to 100.000 and 
saw on my linux dev PC (james server, stresstest and databases all 
running on same dev PC):

Derby: after many mails sending:
java.io.IOException: Too many open files
Exception in thread "pool-1-thread-1044" java.lang.NoClassDefFoundError: 

H2: after 400 mails:
java.io.IOException: Too many open files
Caused by: <openjpa-1.2.2-r422266:898935 nonfatal general error> 
org.apache.openjpa.persistence.PersistenceException: Timeout trying to 
lock table MEMBERSHIP [50200-79] {prepstmnt 406576
INSERT INTO Membership (mailboxId, uid, answered, deleted, draft,
         flagged, internalDate, recent, seen, size, MESSAGE_ID)
     VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[params=(long) 1, (long) 49, (int) 0, (int) 0, (int) 0, (int) 0, 
(Timestamp) 2010-05-01 08:37:10.293, (int) 0, (int) 0, (int) 25, (long) 
4151]} [code=50200, state=HYT00]

MySql : after +/- 1000 (always around 1002 and 1007) mails :
Exception in thread "pool-1-thread-84" <openjpa-1.2.2-r422266:898935 
nonfatal user error> org.apache.openjpa.persistence.NoResultException: 
The query on candidate type "class 
org.apache.james.imap.jpa.mail.model.JPAMailbox" with filter "SELECT 
mailbox FROM Mailbox mailbox WHERE mailbox.mailboxId = :idParam" was 
configured to have a unique result, but no instance matched the query.
org.apache.james.imap.mailbox.MailboxNotFoundException: Mailbox 
'#mail.INBOX' not found.

3 different databases, 3 different behaviour/exceptions.

Running 3 components (james server, stresstest, database) on my 
"not-so-strong-PC" may be an issue.

To make the tests successful, I added a Thread.sleep(5) (15 ms for 
embedded derby and h2) between each mail sending.

I suppose we can say that in a real environment, the load will never be 
that heavy, and that real server will perform better.

I also saw that the uid order is not respected:

Append message with uid=6258
Append message with uid=6259
Append message with uid=6256
Append message with uid=6257

This could come from a print mismatch, and not from uid being generated 
in a bad order.

Tks in advance for your feedbacks, if any,


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

View raw message