문제

In Tomcat, your META-INF/context.xml file can contain a JNDI datasource object like so:

<Resource
    name="jdbc/dbLogging"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://mysql.server.example.com:3306/my_db"
    username="my_user"
    password="my_password"

    maxActive="15"
    maxIdle="3"
    maxWait="-1"
/>

What calculations/algorithms/heuristics/etc. can I use to tune what the values of the connection pool settings (maxActive, maxIdle, maxWait, etc.) should be?

Are there any other major connection pool settings I'm overlooking here?

도움이 되었습니까?

해결책

You may also use

<Context>
   ...
   <Resource name="jdbc/oralocal" auth="Container" type="javax.sql.DataSource"
         url="your URL"
         driverClassName="driver class name"
         username="dbuser" password="password"
         maxActive="20" 
         maxIdle="3" 
         maxWait="10000"
         poolPreparedStatements="true"
         maxOpenPreparedStatements="100"
         validationQuery="SQL Query" />
</Context>

Pooling of prepared statements and maximum open prepared statements also you can use to tune prepared statements.

have a Look at this

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top