【异常】ShardingSphere启动很慢的问题 Too slow to load meta data when start up
一、出现的场景
依赖的sharding-jdbc-core的版本从 <version>4.0.0</version>升级到<version>4.1.1</version>,导致项目启动特别慢
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-core</artifactId>
</dependency>
二、解决办法
设置max.connections.size.per.query参数
Properties properties = new Properties(); properties.setProperty("max.connections.size.per.query", "50"); return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), configuration, properties);
你投入得越多,就能得到越多得价值
浙公网安备 33010602011771号