Sam
Sam

Reputation: 6890

I want choose a connection pool for high throughput application

I used C3P0 connection pool to now but get not stable behavior. I test in various kinds of environments and improvement database options. I found today Tomcat 7 jdbc connection pool released and get it. Do anyone use it and get better performance than C3p0? (I also test boncp connection pool)
My application is very high load. My problems are:

  1. after pass a hour connection pool throws "Can't Open Connection" exception.
  2. sometimes I get this exception "Attempted to use a closed or broken resource" pool and when restart my connection pool(by its mbean) problem fixed
    My C3P0 parameters are:

    initialPoolSize = 1
    minPoolSize=1
    maxPoolSize = 50
    maxIdleTime = 20000
    debugUnreturnedConnectionStackTraces = true
    propertyCycle =60
    acquireRetryDelay =1000
    maxConnectionAge =0
    checkoutTimeout =5000
    acquireIncrement =1
    numHelperThreads =5
    acquireRetryAttempts =1
    unreturnedConnectionTimeout =90
    breakAfterAcquireFailure =false
    I also test this parameters with several value but don't see any perceptible changes.

Upvotes: 1

Views: 811

Answers (1)

Sumit Bisht
Sumit Bisht

Reputation: 1517

I haven't tried the tomcat pool yet, but will look into this soon. What you can probably do is tweak your c3p0 pool for optimization. This will vary according to the actual load over your application, but as compared to other pooling technologies, I've found c3p0 to be flexible. It would be nice if you could elaborate your problem here, and mention the pooling parameters you are using.

Upvotes: 0

Related Questions