Add default db.pool.config.* options from main nacos repository. Expose db.pool.config.connectionTimeout as environment variable: DB_POOL_CONNECTION_TIMEOUT

This commit is contained in:
shenb15 2023-10-23 21:35:10 +08:00
parent ac214ac776
commit c624cdf95a
3 changed files with 7 additions and 0 deletions

View File

@ -145,6 +145,7 @@ Run the following command
| NACOS_AUTH_IDENTITY_KEY | nacos.core.auth.server.identity.key | `Note: It is removed from Nacos 2.2.1` | | NACOS_AUTH_IDENTITY_KEY | nacos.core.auth.server.identity.key | `Note: It is removed from Nacos 2.2.1` |
| NACOS_AUTH_IDENTITY_VALUE | nacos.core.auth.server.identity.value | `Note: It is removed from Nacos 2.2.1` | | NACOS_AUTH_IDENTITY_VALUE | nacos.core.auth.server.identity.value | `Note: It is removed from Nacos 2.2.1` |
| NACOS_SECURITY_IGNORE_URLS | nacos.security.ignore.urls | default : `/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**` | | NACOS_SECURITY_IGNORE_URLS | nacos.security.ignore.urls | default : `/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**` |
| DB_POOL_CONNECTION_TIMEOUT | Database connection pool timeout in milliseconds | default : **30000** |
## Advanced configuration ## Advanced configuration

View File

@ -170,6 +170,7 @@
| NACOS_AUTH_IDENTITY_KEY | nacos.core.auth.server.identity.key | `注意该环境变量在Nacos 2.2.1版本中已移除` | | NACOS_AUTH_IDENTITY_KEY | nacos.core.auth.server.identity.key | `注意该环境变量在Nacos 2.2.1版本中已移除` |
| NACOS_AUTH_IDENTITY_VALUE | nacos.core.auth.server.identity.value | `注意该环境变量在Nacos 2.2.1版本中已移除` | | NACOS_AUTH_IDENTITY_VALUE | nacos.core.auth.server.identity.value | `注意该环境变量在Nacos 2.2.1版本中已移除` |
| NACOS_SECURITY_IGNORE_URLS | nacos.security.ignore.urls | default : `/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**` | | NACOS_SECURITY_IGNORE_URLS | nacos.security.ignore.urls | default : `/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**` |
| DB_POOL_CONNECTION_TIMEOUT | 数据库连接池超时时间,单位为毫秒 | 默认 : **30000** |
## 高级配置 ## 高级配置

View File

@ -20,6 +20,11 @@ db.num=${MYSQL_DATABASE_NUM:1}
db.url.0=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?${MYSQL_SERVICE_DB_PARAM:characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false} db.url.0=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?${MYSQL_SERVICE_DB_PARAM:characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false}
db.user.0=${MYSQL_SERVICE_USER} db.user.0=${MYSQL_SERVICE_USER}
db.password.0=${MYSQL_SERVICE_PASSWORD} db.password.0=${MYSQL_SERVICE_PASSWORD}
## DB connection pool settings
db.pool.config.connectionTimeout=${DB_POOL_CONNECTION_TIMEOUT:30000}
db.pool.config.validationTimeout=10000
db.pool.config.maximumPoolSize=20
db.pool.config.minimumIdle=2
### The auth system to use, currently only 'nacos' and 'ldap' is supported: ### The auth system to use, currently only 'nacos' and 'ldap' is supported:
nacos.core.auth.system.type=${NACOS_AUTH_SYSTEM_TYPE:nacos} nacos.core.auth.system.type=${NACOS_AUTH_SYSTEM_TYPE:nacos}
### worked when nacos.core.auth.system.type=nacos ### worked when nacos.core.auth.system.type=nacos