项目在使用shardingsphere5.1后,启动会变得特别慢,初步判断是shardingsphere中的elastic-job导致的,会在项目启动的时候卡住30秒甚至两分钟(一般为30秒的整数倍),启动日志如下:
2023-11-09 16:30:42.756[TID: N/A] INFO 6540 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2023-11-09 16:30:42.890[TID: N/A] INFO 6540 --- [ main] c.a.AsyncConfig$ContextAwarePoolExecutor : Initializing ExecutorService 'getAsyncExecutor'
2023-11-09 16:30:43.314[TID: N/A] INFO 6540 --- [ main] org.redisson.Version : Redisson 3.16.6
2023-11-09 16:30:45.591[TID: N/A] INFO 6540 --- [sson-netty-4-28] o.r.c.pool.PubSubConnectionPool : 1 connections initialized for 192.168.1.211/192.168.1.211:6379
2023-11-09 16:30:45.591[TID: N/A] INFO 6540 --- [sson-netty-4-29] o.r.c.pool.MasterPubSubConnectionPool : 1 connections initialized for 192.168.1.211/192.168.1.211:6379
2023-11-09 16:30:45.673[TID: N/A] INFO 6540 --- [sson-netty-4-32] o.r.c.pool.MasterConnectionPool : 24 connections initialized for 192.168.1.211/192.168.1.211:6379
2023-11-09 16:30:45.673[TID: N/A] INFO 6540 --- [isson-netty-4-1] o.r.connection.pool.SlaveConnectionPool : 24 connections initialized for 192.168.1.211/192.168.1.211:6379
2023-11-09 16:30:45.831[TID: N/A] WARN 6540 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2023-11-09 16:30:45.832[TID: N/A] INFO 6540 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2023-11-09 16:31:45.443[TID: N/A] INFO 6540 --- [ main] org.quartz.impl.StdSchedulerFactory : Using default implementation for ThreadExecutor
2023-11-09 16:31:45.460[TID: N/A] INFO 6540 --- [ main] org.quartz.core.SchedulerSignalerImpl : Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2023-11-09 16:31:45.461[TID: N/A] INFO 6540 --- [ main] org.quartz.core.QuartzScheduler : Quartz Scheduler v.2.3.2 created.
2023-11-09 16:31:45.462[TID: N/A] INFO 6540 --- [ main] org.quartz.simpl.RAMJobStore : RAMJobStore initialized.
2023-11-09 16:31:45.463[TID: N/A] INFO 6540 --- [ main] org.quartz.core.QuartzScheduler : Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
2023-11-09 16:31:45.463[TID: N/A] INFO 6540 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance.
2023-11-09 16:31:45.463[TID: N/A] INFO 6540 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler version: 2.3.2
2023-11-09 16:31:45.463[TID: N/A] INFO 6540 --- [ main] org.quartz.core.QuartzScheduler : JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@42a327e