I tried MVCC=TRUE and, if anything, it was worse. JMeter output is attached. After 15 or 20 successful executions the console fills with the exceptions below. I also should note that I am logging events - <process-events generate="all"/>. However, this does work using MySQL as an external database instead of Derby or H2, but a pure Java database would be desirable.
Thanks for your continued suggestions. -----Original Message----- From: Rafal Rusin [mailto:[email protected]] Sent: Wednesday, July 14, 2010 2:58 AM To: [email protected] Subject: Re: h2 as internal database On Tue, Jul 13, 2010 at 11:58 PM, Les Spivey <[email protected]> wrote: > I tried using a recent snapshot of Ode 1.3.5 in Tomcat 5.5 using the > instructions for H2 and Hibernate here: > http://ode.apache.org/ode-schema.html. My ode-axis2.properties are: > > ode-axis2.db.pool.min=20 > ode-axis2.db.pool.max=200 > ode-axis2.threads.pool.size=200 > #ode-axis2.threads.pool.size=1 > > ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryImpl > ode-axis2.db.mode=INTERNAL > ode-axis2.db.int.jdbcurl=jdbc:h2:file:C:/Progra~1/Tomcat_5_5/webapps/ode/WEB-INF/h2db/ode-db;DB_CLOSE_ON_EXIT=false;user=sa > ode-axis2.db.int.driver=org.h2.Driver > hibernate.dialect=org.hibernate.dialect.H2Dialect > ode-axis2.acquireTransactionLocks=true > > Using the Ode HelloWorld2 example, if I start a single thread in JMeter to > access the service it works fine. However, if I try multiple threads hitting > the service (say 20) I almost immediately get the exception that follows. > This is similar to what I see with Derby under the same conditions. Do > either Derby or H2 actually work when the ode-axis2.threads.pool.size is > greater than one? This is good question :-) Currently it doesn't. But as Veresh said, this could be improved I guess. In theory H2 supports MVCC by MVCC=TRUE. In practice, it's untested. So I guess you can try to comment out acquireTransactionLocks and set MVCC=TRUE. Then please provide your output from JMeter. > > > 14:45:07,697 WARN [GeronimoConnectionEventListener] connectionErrorOccurred > called with null > org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "ODE_JOB"; SQL > statement: > insert into ODE_JOB (jobid, nodeid, ts, scheduled, transacted, > instanceId,mexId,processId,type,channel,correlatorId,correlationKeyS > et,retryCount,inMem,detailsExt) values(?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?) > [50200-137] > at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) > at org.h2.message.DbException.get(DbException.java:167) > at org.h2.message.DbException.get(DbException.java:144) > at org.h2.table.RegularTable.doLock(RegularTable.java:466) > at org.h2.table.RegularTable.lock(RegularTable.java:404) > at org.h2.command.dml.Insert.insertRows(Insert.java:119) > at org.h2.command.dml.Insert.update(Insert.java:82) > at org.h2.command.CommandContainer.update(CommandContainer.java:70) > at org.h2.command.Command.executeUpdate(Command.java:199) > at > org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141) > at > org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127) > at > org.tranql.connector.jdbc.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:103) > at > org.apache.ode.scheduler.simple.JdbcDelegate.insertJob(JdbcDelegate.java:229) > at > org.apache.ode.scheduler.simple.SimpleScheduler.schedulePersistedJob(SimpleScheduler.java:378) > at > org.apache.ode.scheduler.simple.SimpleScheduler.schedulePersistedJob(SimpleScheduler.java:354) > at > org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl.invoke(MyRoleMessageExchangeImpl.java:154) > at > org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:126) > at > org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:69) > at > org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:52) > at > org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173) > at > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167) > at > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) > at > org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) > at > org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) > at > org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1287) > at java.lang.Thread.run(Unknown Source) > 14:45:07,806 ERROR [SimpleScheduler] Database error. > org.apache.ode.scheduler.simple.DatabaseException: > org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "ODE_JOB"; SQL > stateme > nt: > insert into ODE_JOB (jobid, nodeid, ts, scheduled, transacted, > instanceId,mexId,processId,type,channel,correlatorId,correlationKeyS > et,retryCount,inMem,detailsExt) values(?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?) > [50200-137] > at > org.apache.ode.scheduler.simple.JdbcDelegate.insertJob(JdbcDelegate.java:231) > at > org.apache.ode.scheduler.simple.SimpleScheduler.schedulePersistedJob(SimpleScheduler.java:378) > at > org.apache.ode.scheduler.simple.SimpleScheduler.schedulePersistedJob(SimpleScheduler.java:354) > at > org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl.invoke(MyRoleMessageExchangeImpl.java:154) > at > org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:126) > at > org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:69) > at > org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:52) > > > > > -----Original Message----- > From: Rafal Rusin [mailto:[email protected]] > Sent: Wednesday, July 07, 2010 2:12 PM > To: [email protected] > Subject: Re: h2 as internal database > > In order to get rid of deadlocks in H2, you need to grab latest ODE > snapshot and add > ode.acquireTransactionLocks=true > to ode-axis2.properties. > It's needed, because H2 uses poor locking mechanism. > I tried H2 with Hibernate and it worked well. > > On Wed, Jul 7, 2010 at 8:27 PM, Les Spivey <[email protected]> wrote: >> The Ode documentation here >> http://ode.apache.org/ode-jbi-and-axis2-properties-overview.html shows >> how to setup an internal database other than Derby using >> "ode-axis2.db.mode=INTERNAL". Has anyone done this with H2? I've tried >> and it appears to work until there is any kind of load then I get >> "org.apache.openjpa.persistence.PersistenceException: Deadlock detected" >> exceptions. ode-axis2.threads.pool.size is set to 200. >> >> >> >> I've seen examples with H2 as an external database using Hibernate but I >> cannot use Hibernate because of the license. Also, I'm using Jetty and >> not Tomcat. Any suggestions? >> >> >> >> Thanks, Les. >> >> > > -- > Regards, > Rafał Rusin > http://rrusin.blogspot.com -- Regards, Rafał Rusin http://rrusin.blogspot.com
<?xml version="1.0" encoding="UTF-8"?> <testResults version="1.2"> <sample t="129" lt="0" ts="1279123186001" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-1" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="108" lt="0" ts="1279123186132" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-1" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="112" lt="0" ts="1279123186241" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-1" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="115" lt="0" ts="1279123186355" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-1" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="137" lt="0" ts="1279123186472" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-1" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="235" lt="0" ts="1279123186499" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-2" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="220" lt="0" ts="1279123186611" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-1" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="193" lt="0" ts="1279123186737" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-2" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="218" lt="0" ts="1279123186832" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-1" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="224" lt="0" ts="1279123186932" s="true" lb="Ode135HelloWorld" rc="200" rm="OK" tn="20 Threads 1-2" dt="text" by="384"> <responseData class="java.lang.String"><?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"><TestPart xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ode/bpel/unit-test.wsdl">Hello World</TestPart></odens:helloResponse></soapenv:Body></soapenv:Envelope></responseData> </sample> <sample t="106903" lt="0" ts="1279123192015" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-13" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="106404" lt="0" ts="1279123192514" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-14" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="109908" lt="0" ts="1279123189012" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-7" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="107405" lt="0" ts="1279123191515" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-12" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="108411" lt="0" ts="1279123190509" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-10" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="108911" lt="0" ts="1279123190010" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-9" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="110917" lt="0" ts="1279123188004" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-5" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="103401" lt="0" ts="1279123195520" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-20" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="104400" lt="0" ts="1279123194522" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-18" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="104899" lt="0" ts="1279123194023" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-17" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="111417" lt="0" ts="1279123187505" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-4" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="105909" lt="0" ts="1279123193013" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-15" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="111919" lt="0" ts="1279123187003" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-3" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="107911" lt="0" ts="1279123191009" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-11" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="103901" lt="0" ts="1279123195021" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-19" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="111764" lt="0" ts="1279123187158" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-2" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="110410" lt="0" ts="1279123188513" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-6" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="109413" lt="0" ts="1279123189511" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-8" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="105403" lt="0" ts="1279123193523" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-16" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> <sample t="111875" lt="0" ts="1279123187052" s="false" lb="Ode135HelloWorld" rc="000" rm="Error parsing HTTP status line &quot;&quot;: java.util.NoSuchElementException" tn="20 Threads 1-1" dt="text" by="0"> <responseData class="java.lang.String"></responseData> </sample> </testResults>
