duoduo_server/taurus-server/taurus-permanent/config/taurus-core.xml

96 lines
4.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?xml version="1.0" encoding="UTF-8"?>
<serivce-core>
<log4jPath>log4j.properties</log4jPath>
<plugin>
<id>database</id>
<class>com.taurus.core.plugin.database.DataBasePlugin</class>
<poolConfig>
<!-- 最大连接数, 默认10个 -->
<maxPool>100</maxPool>
<!-- 最小空闲连接数, 默认0个 -->
<minIdle>10</minIdle>
<!-- 配置获取连接等待超时的时间,单位是毫秒, 默认180000 -->
<maxLifetime>180000</maxLifetime>
<!--hsqldb - "select 1 from INFORMATION_SCHEMA.SYSTEM_USERS"
Oracle - "select 1 from dual"
DB2 - "select 1 from sysibm.sysdummy1"
mysql - "select 1" -->
<validationQuery>select 1</validationQuery>
<!-- 连接超时时间,默认30000-->
<connectionTimeout>10000</connectionTimeout>
<!-- 待机超时时间,单位是毫秒, 默认60000 -->
<idleTimeout>60000</idleTimeout>
<!-- jdbc 属性 -->
<props>
<useSSL>false</useSSL>
<useUnicode>true</useUnicode>
<characterEncoding>utf-8</characterEncoding>
<!-- 服务器时区 -->
<serverTimezone>UTC</serverTimezone>
<!-- 预编译缓存 -->
<cachePrepStmts>true</cachePrepStmts>
<!-- 预编译缓存大小 -->
<prepStmtCacheSize>250</prepStmtCacheSize>
<!-- 控制长度多大的sql可以被缓存 -->
<prepStmtCacheSqlLimit>2048</prepStmtCacheSqlLimit>
</props>
</poolConfig>
<databases>
<db>
<name>db1</name>
<driverName>com.mysql.cj.jdbc.Driver</driverName>
<jdbcUrl>jdbc:mysql://123.207.203.115:8060/wb_game</jdbcUrl>
<userName>wb_game</userName>
<password>363b76546c</password>
</db>
</databases>
</plugin>
<plugin>
<id>redis</id>
<class>com.taurus.core.plugin.redis.RedisPlugin</class>
<poolConfig>
<!-- 最大连接数, 默认8个 -->
<maxTotal>80</maxTotal>
<!-- 最大空闲连接数, 默认8个 -->
<maxIdle>20</maxIdle>
<!-- 最小空闲连接数, 默认0个 -->
<minIdle>5</minIdle>
<!-- 获取连接时的最大等待毫秒数(如果设置为阻塞时BlockWhenExhausted),如果超时就抛异常, 小于零:阻塞不确定的时间, 默认-1 -->
<maxWaitMillis>-1</maxWaitMillis>
<!-- 在borrow一个jedis实例时是否提前进行alidate操作, 默认false -->
<testOnBorrow>true</testOnBorrow>
<!-- 在return给pool时是否提前进行validate操作, 默认false -->
<testOnReturn>true</testOnReturn>
<!-- 表示有一个idle object evitor线程对idle object进行扫描如果validate失败
此object会被从pool中drop掉这一项只有在timeBetweenEvictionRunsMillis大于0时才有意义, 默认true -->
<testWhileIdle>true</testWhileIdle>
<!-- 表示idle object evitor每次扫描的最多的对象数, 默认-1 -->
<numTestsPerEvictionRun>100</numTestsPerEvictionRun>
<!-- 表示一个对象至少停留在idle状态的最短时间然后才能被idle object evitor扫描并驱逐
这一项只有在timeBetweenEvictionRunsMillis大于0时才有意义 , 默认60000-->
<minEvictableIdleTimeMillis>60000</minEvictableIdleTimeMillis>
<!-- 逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认30000 -->
<timeBetweenEvictionRunsMillis>30000</timeBetweenEvictionRunsMillis>
<!-- 在minEvictableIdleTimeMillis基础上加入了至少minIdle个对象已经在pool里面了。
如果为-1evicted不会根据idle time驱逐任何对象。如果minEvictableIdleTimeMillisd大于0
则此项设置无意义且只有在timeBetweenEvictionRunsMillis大于0时才有意义默认1800000 -->
<softMinEvictableIdleTimeMillis>1800000</softMinEvictableIdleTimeMillis>
<!-- 连接耗尽时是否阻塞, false报异常,ture阻塞直到超时, 默认true -->
<blockWhenExhausted>true</blockWhenExhausted>
</poolConfig>
<infos>
<info name="group1_db0" host="123.207.203.115" password="cssq@2020" port="6379" database="0" timeout="5000"/>
<info name="group1_db1" host="123.207.203.115" password="cssq@2020" port="6379" database="1" timeout="5000"/>
<info name="group1_db5" host="123.207.203.115" password="cssq@2020" port="6379" database="5" timeout="5000"/>
<info name="group1_db8" host="123.207.203.115" password="cssq@2020" port="6379" database="8" timeout="5000"/>
<info name="group1_db10" host="123.207.203.115" password="cssq@2020" port="6379" database="10" timeout="5000"/>
</infos>
</plugin>
</serivce-core>