1.Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
.....
.....
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to database server. Attempted reconnect 3 times. Gi
ving up.
2.
jdbc:mysql://xxxxxxx:3306/订单表_0?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&connectTimeout=1000&socketTimeout=3000
3. 重连了3次
重传了多次
4.
Parameter | Default | Description |
---|---|---|
initialSize | 0 | The initial number of connections that are created when the pool is started. Since: 1.2 |
maxTotal | 8 | The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit. |
maxIdle | 8 | The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit. |
minIdle | 0 | The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none. |
maxWaitMillis | indefinitely | The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely. |