Thanks Thomas,

I've stopped running out of connection pools... I'm above the threshold now.

What is the reason for having both a properties and XML configuration file? I think it would be more convenient to have a globals section in the repository.xml. Just my opinion.

Thanks again,
Aaron

Thomas Mahler wrote:

Hi Aaron,

OJB uses several Pools. One pool is used for Broker instances.
Then there is another pool for JDBC connections.
What you see is a shortage of JDBC connections.

The Broker pool is configured in OJB.properties, as it is a global setting.
The Connection Pool is configured in repository.xml, as it can be configured per JDBC connection.


        <connection-pool
            maxActive="100"
            whenExhaustedAction="2"
        />

Allows 100 parallel connnections. If all connections are exhausted the pool grows (="2").

all features are documented here:
http://db.apache.org/ojb/repository.html#connection-pool

cheers,
Thomas

Aaron Longwell wrote:

I have decided to load test an OJB+Struts web application I am building. The results, pass! (but not by a whole lot).

My goal was to support 100 simultaneous users. The application is an event scheduler, for which one view is a calendar-formatted display of events for the month. It uses OJBs getCollectionByQuery (PB API) to retrieve the events.

Using Apache's JMeter, I simulated 100 users loading the calendar page about every 15 seconds. This comes out to around 6-8 requests per second. Average response times are under 1 second on my very modest machine. I received no errors after running at this load for several minutes... in short.. a successful test.

However, upping the users to 150 begins destroying the error percentage. Every error that occured was a commons-logging "unable to borrow connection from pool" exception (see afterword for StackTrace). Can someone explain the performance enhancement features of OJB to me?

I have perused the OJB.properties and found maxActive=100 as the default for the number of brokers. I have changed this to 600 with no result. In my stack trace I see that there is a connectionPoolDescriptor setting of maxActive=21 (see below). Is it possible to change this value in the properties file? What is the name for the name value pair if so? Are there other enhancements I can make to support more users?

Thanks,
Aaron Longwell

Selected Portions of Stack Trace:

Used ConnectionManager instance could not obtain a connection: Could not borrow connection from pool - org.apache.ojb.broker.metadata.JdbcConnectionDescriptor: [EMAIL PROTECTED]
jcd-alias=dovedb
default-connection=true
dbms=MySQL
jdbc-level=2.0
driver=com.mysql.jdbc.Driver
protocol=jdbc
sub-protocol=mysql
db-alias=//localhost/dove
eager-release=false
ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, maxActive=21, maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false, minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false, removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, testOnBorrow=true}



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to