Question

I'm running YouTrack 5.1 in a windows environment (as a service), and am getting the OutOfMemory exception below. Is there a way to increase the heap size when running as a service?

03 Mar 2014 14:52:23,363 ERROR [JobRunShell         ] [QuartzJobProcessor0                               ] [] Job webr.framework.controller.BeanContainerAwareExecutorWrapper@1af4241.VerifyUsableSpaceOnScheduleDetail threw an unhandled Exception: 
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class jetbrains.mps.businessRules.runtime.impl.RuleJobImpl] failed; nested exception is java.lang.OutOfMemoryError: Java heap space
    at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:320)
    at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at jetbrains.exodus.core.execution.RunnableJob.execute(RunnableJob.java:41)
    at jetbrains.exodus.core.execution.Job.run(Job.java:99)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.executeJob(ThreadJobProcessor.java:132)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doExecuteJob(JobProcessorQueueAdapter.java:254)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doJobs(JobProcessorQueueAdapter.java:167)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.run(ThreadJobProcessor.java:110)
    at jetbrains.exodus.core.execution.ThreadJobProcessor$1.run(ThreadJobProcessor.java:43)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.OutOfMemoryError: Java heap space
    at jetbrains.exodus.tree.btree.BTreeBase.loadLeaf(BTreeBase.java:155)
    at jetbrains.exodus.tree.btree.BasePageMutable.getKey(BasePageMutable.java:166)
    at jetbrains.exodus.tree.btree.InternalPageMutable.getKey(InternalPageMutable.java:30)
    at jetbrains.exodus.tree.btree.BasePageMutable.binarySearch(BasePageMutable.java:268)
    at jetbrains.exodus.tree.btree.BasePageMutable.binarySearch(BasePageMutable.java:231)
    at jetbrains.exodus.tree.btree.BasePageMutable.binarySearch(BasePageMutable.java:226)
    at jetbrains.exodus.tree.btree.InternalPage.binarySearchGuessUnsafe(InternalPage.java:210)
    at jetbrains.exodus.tree.btree.InternalPage.binarySearchGuess(InternalPage.java:200)
    at jetbrains.exodus.tree.btree.InternalPageMutable.delete(InternalPageMutable.java:304)
    at jetbrains.exodus.tree.btree.InternalPageMutable.delete(InternalPageMutable.java:306)
    at jetbrains.exodus.tree.btree.BTreeMutable.delete(BTreeMutable.java:188)
    at jetbrains.exodus.tree.btree.BTreeMutable.deleteImpl(BTreeMutable.java:175)
    at jetbrains.exodus.tree.btree.BTreeMutable.delete(BTreeMutable.java:149)
    at jetbrains.exodus.env.StoreImpl.delete(StoreImpl.java:109)
    at jetbrains.exodus.database.impl.PropertiesTable.deleteNoFail(PropertiesTable.java:115)
    at jetbrains.exodus.database.PersistentEntityStoreImpl.clearProperties(PersistentEntityStoreImpl.java:823)
    at jetbrains.exodus.database.PersistentEntityStoreImpl.deleteEntity(PersistentEntityStoreImpl.java:1518)
    at jetbrains.exodus.database.PersistentEntity.delete(PersistentEntity.java:160)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.deleteEntityInternal(TransientSessionImpl.java:1404)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.access$1100(TransientSessionImpl.java:26)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl$20.run(TransientSessionImpl.java:1396)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.addChangeAndRun(TransientSessionImpl.java:1653)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.deleteEntity(TransientSessionImpl.java:1394)
    at com.jetbrains.teamsys.dnq.database.TransientEntityImpl.delete(TransientEntityImpl.java:326)
    at com.jetbrains.teamsys.dnq.database.EntityOperations.remove(EntityOperations.java:61)
    at com.jetbrains.teamsys.dnq.database.EntityOperations.remove(EntityOperations.java:30)
    at jetbrains.charisma.persistent.AdministrativeTasks_VerifyUsableSpace_Then$1.visit(AdministrativeTasks_VerifyUsableSpace_Then.java:45)
    at jetbrains.charisma.persistent.AdministrativeTasks_VerifyUsableSpace_Then$1.visit(AdministrativeTasks_VerifyUsableSpace_Then.java:43)
    at jetbrains.mps.internal.collections.runtime.IVisitor.invoke(IVisitor.java:14)
    at jetbrains.mps.internal.collections.runtime.IterableUtils.visitAll(IterableUtils.java:17)
    at jetbrains.mps.internal.collections.runtime.Sequence.visitAll(Sequence.java:85)
    at jetbrains.charisma.persistent.AdministrativeTasks_VerifyUsableSpace_Then.run(AdministrativeTasks_VerifyUsableSpace_Then.java:43)
03 Mar 2014 14:52:23,363 ERROR [ErrorLogger         ] [QuartzJobProcessor0                               ] [] Job (webr.framework.controller.BeanContainerAwareExecutorWrapper@1af4241.VerifyUsableSpaceOnScheduleDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class jetbrains.mps.businessRules.runtime.impl.RuleJobImpl] failed; nested exception is java.lang.OutOfMemoryError: Java heap space]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at jetbrains.exodus.core.execution.RunnableJob.execute(RunnableJob.java:41)
    at jetbrains.exodus.core.execution.Job.run(Job.java:99)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.executeJob(ThreadJobProcessor.java:132)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doExecuteJob(JobProcessorQueueAdapter.java:254)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doJobs(JobProcessorQueueAdapter.java:167)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.run(ThreadJobProcessor.java:110)
    at jetbrains.exodus.core.execution.ThreadJobProcessor$1.run(ThreadJobProcessor.java:43)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class jetbrains.mps.businessRules.runtime.impl.RuleJobImpl] failed; nested exception is java.lang.OutOfMemoryError: Java heap space
    at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:320)
    at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    ... 8 more
Caused by: java.lang.OutOfMemoryError: Java heap space
    at jetbrains.exodus.tree.btree.BTreeBase.loadLeaf(BTreeBase.java:155)
    at jetbrains.exodus.tree.btree.BasePageMutable.getKey(BasePageMutable.java:166)
    at jetbrains.exodus.tree.btree.InternalPageMutable.getKey(InternalPageMutable.java:30)
    at jetbrains.exodus.tree.btree.BasePageMutable.binarySearch(BasePageMutable.java:268)
    at jetbrains.exodus.tree.btree.BasePageMutable.binarySearch(BasePageMutable.java:231)
    at jetbrains.exodus.tree.btree.BasePageMutable.binarySearch(BasePageMutable.java:226)
    at jetbrains.exodus.tree.btree.InternalPage.binarySearchGuessUnsafe(InternalPage.java:210)
    at jetbrains.exodus.tree.btree.InternalPage.binarySearchGuess(InternalPage.java:200)
    at jetbrains.exodus.tree.btree.InternalPageMutable.delete(InternalPageMutable.java:304)
    at jetbrains.exodus.tree.btree.InternalPageMutable.delete(InternalPageMutable.java:306)
    at jetbrains.exodus.tree.btree.BTreeMutable.delete(BTreeMutable.java:188)
    at jetbrains.exodus.tree.btree.BTreeMutable.deleteImpl(BTreeMutable.java:175)
    at jetbrains.exodus.tree.btree.BTreeMutable.delete(BTreeMutable.java:149)
    at jetbrains.exodus.env.StoreImpl.delete(StoreImpl.java:109)
    at jetbrains.exodus.database.impl.PropertiesTable.deleteNoFail(PropertiesTable.java:115)
    at jetbrains.exodus.database.PersistentEntityStoreImpl.clearProperties(PersistentEntityStoreImpl.java:823)
    at jetbrains.exodus.database.PersistentEntityStoreImpl.deleteEntity(PersistentEntityStoreImpl.java:1518)
    at jetbrains.exodus.database.PersistentEntity.delete(PersistentEntity.java:160)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.deleteEntityInternal(TransientSessionImpl.java:1404)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.access$1100(TransientSessionImpl.java:26)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl$20.run(TransientSessionImpl.java:1396)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.addChangeAndRun(TransientSessionImpl.java:1653)
    at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.deleteEntity(TransientSessionImpl.java:1394)
    at com.jetbrains.teamsys.dnq.database.TransientEntityImpl.delete(TransientEntityImpl.java:326)
    at com.jetbrains.teamsys.dnq.database.EntityOperations.remove(EntityOperations.java:61)
    at com.jetbrains.teamsys.dnq.database.EntityOperations.remove(EntityOperations.java:30)
    at jetbrains.charisma.persistent.AdministrativeTasks_VerifyUsableSpace_Then$1.visit(AdministrativeTasks_VerifyUsableSpace_Then.java:45)
    at jetbrains.charisma.persistent.AdministrativeTasks_VerifyUsableSpace_Then$1.visit(AdministrativeTasks_VerifyUsableSpace_Then.java:43)
    at jetbrains.mps.internal.collections.runtime.IVisitor.invoke(IVisitor.java:14)
    at jetbrains.mps.internal.collections.runtime.IterableUtils.visitAll(IterableUtils.java:17)
    at jetbrains.mps.internal.collections.runtime.Sequence.visitAll(Sequence.java:85)
    at jetbrains.charisma.persistent.AdministrativeTasks_VerifyUsableSpace_Then.run(AdministrativeTasks_VerifyUsableSpace_Then.java:43)
Was it helpful?

Solution

The solution was to run %your_YouTrack_location%\bin\tomcat6w.exe //ES//YouTrack, which opens up a GUI editor for tomcat settings, and increased the maximum memory pool setting on the Java tab.

enter image description here

OTHER TIPS

When installed as a service, YouTrack runs inside Apache Tomcat, so the answer is also correct for any Tomcat as a service installation. Here's the doc on how to change root password in YouTrack: http://confluence.jetbrains.com/display/YTD5/FAQ#FAQ-HowtorestoremyrootpasswordifIrunYouTrackasWindowsservice%3F. Instead of providing -Djetbrains.charisma.restoreRootPassword=true you just need to set -Xmx1024m, where 1024 is a heap size in megabytes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top