ab
spring
java
mysql5.7
show variables like 'max_connections'
/etc/my.cnf
lower_case_table_names=1
max_connections = 1000
service mysqld start
service mysqld stop
ab -n 5000 -c 100 -p d:\test.txt -T application/x-www-form-urlencoded -w http://127.0.0.1:9080/****/api/lend >>d:\test.html
spring
<!--initialSize: 初始化连接-->
<property name="initialSize" value="30"/>
<!-- 连接被泄露时是否打印 -->
<property name="logAbandoned" value="true"/>
<!--maxIdle: 最大空闲连接-->
<property name="maxIdle" value="10"/>
<!--minIdle: 最小空闲连接-->
<property name="minIdle" value="5"/>
<property name="maxActive" value="200"></property>
<!--removeAbandoned: 是否自动回收超时连接-->
<property name="removeAbandoned" value="true"/>
<!--removeAbandonedTimeout: 超时时间(以秒数为单位)-->
<property name="removeAbandonedTimeout" value="180"/>
<!--maxWait: 超时等待时间以毫秒为单位 6000毫秒/1000等于60秒-->
<property name="maxWait" value="12000"/>
<property name="poolPreparedStatements" value="true"></property>
java
echo Using CATALINA_BASE: "%CATALINA_BASE%"
echo Using CATALINA_HOME: "%CATALINA_HOME%"
echo Using CATALINA_TMPDIR: "%CATALINA_TMPDIR%"
set JAVA_OPTS=%JAVA_OPTS% -server -Xms1024m -Xmx1024m -Xss1024K -XX:PermSize=128m -XX:MaxPermSize=256m
mysql5.7
show variables like 'max_connections'
/etc/my.cnf
lower_case_table_names=1
max_connections = 1000
service mysqld start
service mysqld stop