Created
August 14, 2014 06:37
dbcp settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8'?> | |
<Context> | |
<Resource | |
name="jdbc/sc_master" | |
auth="Container" | |
type="javax.sql.DataSource" | |
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" | |
driverClassName="com.mysql.jdbc.Driver" | |
url="jdbc:mysql://localhost:3306/sc_ryi" | |
closeMethod="close" | |
username="root" | |
password="passwd" | |
initialSize="5" | |
minIdle="1" | |
maxIdle="10" | |
maxActive="100" ← tomcatのmaxThreadsに応じて変化させる。(maxThreads * サーバ台数) | |
maxWait="5000" | |
validationQuery="SELECT 1" | |
validationQueryTimeout="5" | |
testOnBorrow="true" | |
testWhileIdle="true" | |
timeBetweenEvictionRunsMillis="1800000" | |
numTestsPerEvictionRun="5" | |
minEvictableIdleTimeMillis="86400000" | |
removeAbandoned="true" | |
removeAbandonedTimeout="600" | |
/> | |
</Context> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment