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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM