Whenever the Quartz scheduler is deployed in spring framework, by default 10 worker threads will start during the application startup. This causes high memory consumption and leads to memory overflow errors. This can be solved by overwriting the built-in quartz properties of spring.xml file. (Use Thread pool concept) as shown below

<property name="quartzProperties" >
<props >
<prop key="org.quartz.threadPool.class"> org.quartz.simpl.SimpleThreadPool</prop >
<prop key="org.quartz.threadPool.threadCount" >1</prop >
<prop key="org.quartz.threadPool.threadPriority" >5</prop >
</props >
</property >

0 comments