Reindexing out of the blue

Sometimes Intellij starts indexing out of the blue and stops me working for minutes, it just happened to me again and I guess the stacktrace below is related to that. Now to the question: Can reindexing behaviour be configured?


2010-04-16 14:10:42,771 [103907696]   INFO - j.util.indexing.FileBasedIndex - Mapping failed: C:\Program Files\JetBrains\IntelliJ IDEA 95.24\.IntelliJIdea90\system\index\stubs\java.method.name\java.method.name, position=0, length=10485760
java.lang.RuntimeException: Mapping failed: C:\Program Files\JetBrains\IntelliJ IDEA 95.24\.IntelliJIdea90\system\index\stubs\java.method.name\java.method.name, position=0, length=10485760
    at com.intellij.util.io.ReadWriteMappedBufferWrapper.map(ReadWriteMappedBufferWrapper.java:51)
    at com.intellij.util.io.MappedBufferWrapper.buf(MappedBufferWrapper.java:68)
    at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:260)
    at com.intellij.util.io.PagedFileStorage.put(PagedFileStorage.java:191)
    at com.intellij.util.io.PagedFileStorage.putInt(PagedFileStorage.java:117)
    at com.intellij.util.io.ResizeableMappedFile.putInt(ResizeableMappedFile.java:144)
    at com.intellij.util.io.PersistentEnumerator.markDirty(PersistentEnumerator.java:552)
    at com.intellij.util.io.PersistentHashMap.markDirty(PersistentHashMap.java:278)
    at com.intellij.util.indexing.MapIndexStorage.addValue(MapIndexStorage.java:249)
    at com.intellij.util.indexing.MemoryIndexStorage.addValue(MemoryIndexStorage.java:133)
    at com.intellij.util.indexing.MapReduceIndex.updateWithMap(MapReduceIndex.java:223)
    at com.intellij.psi.stubs.StubIndexImpl$MyIndex.updateWithMap(StubIndexImpl.java:420)
    at com.intellij.psi.stubs.StubIndexImpl.updateIndex(StubIndexImpl.java:402)
    at com.intellij.psi.stubs.StubUpdatingIndex.a(StubUpdatingIndex.java:218)
    at com.intellij.psi.stubs.StubUpdatingIndex.access$200(StubUpdatingIndex.java:49)
    at com.intellij.psi.stubs.StubUpdatingIndex$MyIndex.updateWithMap(StubUpdatingIndex.java:280)
    at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:202)
    at com.intellij.util.indexing.FileBasedIndex$21.run(FileBasedIndex.java:1323)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeNonCancelableSection(ProgressManagerImpl.java:135)
    at com.intellij.util.indexing.FileBasedIndex.a(FileBasedIndex.java:1320)
    at com.intellij.util.indexing.FileBasedIndex.indexFileContent(FileBasedIndex.java:1286)
    at com.intellij.util.indexing.FileBasedIndex$ChangedFilesCollector.a(FileBasedIndex.java:1716)
    at com.intellij.util.indexing.FileBasedIndex$ChangedFilesCollector.forceUpdate(FileBasedIndex.java:1674)
    at com.intellij.util.indexing.FileBasedIndex.ensureUpToDate(FileBasedIndex.java:678)
    at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:161)
    at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:34)
    at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:44)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.a(JavaFileManagerImpl.java:312)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:199)
    at com.intellij.psi.impl.JavaPsiFacadeImpl$PsiElementFinderImpl.findClass(JavaPsiFacadeImpl.java:360)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:175)
    at com.intellij.execution.JavaExecutionUtil.findMainClass(JavaExecutionUtil.java:146)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.findClass(JavaRunConfigurationModule.java:61)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.findNotNullClass(JavaRunConfigurationModule.java:85)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.checkClassName(JavaRunConfigurationModule.java:103)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.checkModuleAndClassName(JavaRunConfigurationModule.java:95)
    at com.intellij.execution.junit.TestMethod.checkConfiguration(TestMethod.java:118)
    at com.intellij.execution.junit.JUnitConfiguration.checkConfiguration(JUnitConfiguration.java:99)
    at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings(RunnerAndConfigurationSettingsImpl.java:255)
    at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings(RunnerAndConfigurationSettingsImpl.java:251)
    at com.intellij.execution.ExecutionUtil.getConfigurationIcon(ExecutionUtil.java:104)
    at com.intellij.execution.actions.RunConfigurationAction.a(RunConfigurationAction.java:106)
    at com.intellij.execution.actions.RunConfigurationAction.a(RunConfigurationAction.java:96)
    at com.intellij.execution.actions.RunConfigurationAction.update(RunConfigurationAction.java:82)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:98)
    at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:143)
    at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:109)
    at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:122)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImmediately(ActionToolbarImpl.java:723)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl$MyTimerListener.run(ActionToolbarImpl.java:686)
    at com.intellij.openapi.actionSystem.impl.WeakTimerListener.run(WeakTimerListener.java:50)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$MyTimer.a(ActionManagerImpl.java:1195)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$MyTimer.access$400(ActionManagerImpl.java:1148)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$MyTimer$1.run(ActionManagerImpl.java:1183)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.c(FocusManagerImpl.java:387)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:47)
    at com.intellij.openapi.wm.impl.FocusManagerImpl$1.runEdt(FocusManagerImpl.java:76)
    at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:25)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:610)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:500)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.IOException: Map failed
    at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758)
    at com.intellij.util.io.ReadWriteMappedBufferWrapper.map(ReadWriteMappedBufferWrapper.java:48)
    ... 68 more
Caused by: java.lang.OutOfMemoryError: Map failed
    at sun.nio.ch.FileChannelImpl.map0(Native Method)
    at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:755)
    ... 69 more
2010-04-16 14:10:42,818 [103907743]   INFO - j.util.indexing.FileBasedIndex - Rebuild requested for index Stubs
java.lang.Throwable
    at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:1216)
    at com.intellij.util.indexing.FileBasedIndex.scheduleRebuild(FileBasedIndex.java:938)
    at com.intellij.util.indexing.FileBasedIndex.ensureUpToDate(FileBasedIndex.java:687)
    at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:161)
    at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:34)
    at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:44)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.a(JavaFileManagerImpl.java:312)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:199)
    at com.intellij.psi.impl.JavaPsiFacadeImpl$PsiElementFinderImpl.findClass(JavaPsiFacadeImpl.java:360)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:175)
    at com.intellij.execution.JavaExecutionUtil.findMainClass(JavaExecutionUtil.java:146)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.findClass(JavaRunConfigurationModule.java:61)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.findNotNullClass(JavaRunConfigurationModule.java:85)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.checkClassName(JavaRunConfigurationModule.java:103)
    at com.intellij.execution.configurations.JavaRunConfigurationModule.checkModuleAndClassName(JavaRunConfigurationModule.java:95)
    at com.intellij.execution.junit.TestMethod.checkConfiguration(TestMethod.java:118)
    at com.intellij.execution.junit.JUnitConfiguration.checkConfiguration(JUnitConfiguration.java:99)
    at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings(RunnerAndConfigurationSettingsImpl.java:255)
    at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings(RunnerAndConfigurationSettingsImpl.java:251)
    at com.intellij.execution.ExecutionUtil.getConfigurationIcon(ExecutionUtil.java:104)
    at com.intellij.execution.actions.RunConfigurationAction.a(RunConfigurationAction.java:106)
    at com.intellij.execution.actions.RunConfigurationAction.a(RunConfigurationAction.java:96)
    at com.intellij.execution.actions.RunConfigurationAction.update(RunConfigurationAction.java:82)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:98)
    at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:143)
    at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:109)
    at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:122)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImmediately(ActionToolbarImpl.java:723)
    at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl$MyTimerListener.run(ActionToolbarImpl.java:686)
    at com.intellij.openapi.actionSystem.impl.WeakTimerListener.run(WeakTimerListener.java:50)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$MyTimer.a(ActionManagerImpl.java:1195)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$MyTimer.access$400(ActionManagerImpl.java:1148)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$MyTimer$1.run(ActionManagerImpl.java:1183)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.c(FocusManagerImpl.java:387)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:47)
    at com.intellij.openapi.wm.impl.FocusManagerImpl$1.runEdt(FocusManagerImpl.java:76)
    at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:25)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:610)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:500)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

2 comments

What are your heap memory settings for IntelliJ?

0

I use the following values (following a recommendation of unknown origin that has served me well, so far)
-Xms728m
-Xmx728m
-XX:MaxPermSize=728m

0

Please sign in to leave a comment.