【异常】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);

 

【异常】ShardingSphere启动很慢的问题 Too slow to load meta data when start up

上一篇:JSP显示新闻


下一篇:Kubernetes:深入了解Service