OutOfMemoryError when indexing

Is anyone seeing errors like these?  It happens to me a few times a day and causes me to have to reindex everything. This is not fun!

java.lang.RuntimeException: Mapping failed: C:\Documents and Settings\me\.IntelliJIdea90\system\index\idindex\IdIndex, position=52428800, 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.get(PagedFileStorage.java:170)
 at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:121)
 at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:141)
 at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:279)
 at com.intellij.util.io.PersistentEnumerator.enumerate(PersistentEnumerator.java:195)
 at com.intellij.util.io.PersistentHashMap$2.onDropFromCache(PersistentHashMap.java:84)
 at com.intellij.util.io.PersistentHashMap$2.onDropFromCache(PersistentHashMap.java:76)
 at com.intellij.util.containers.SLRUMap$2.removeEldestEntry(SLRUMap.java:58)
 at com.intellij.util.containers.hash.LinkedHashMap.put(LinkedHashMap.java:98)
 at com.intellij.util.containers.SLRUMap.put(SLRUMap.java:91)
 at com.intellij.util.containers.SLRUCache.get(SLRUCache.java:41)
 at com.intellij.util.io.PersistentHashMap.appendData(PersistentHashMap.java:190)
 at com.intellij.util.indexing.MapIndexStorage$1.onDropFromCache(MapIndexStorage.java:116)
 at com.intellij.util.indexing.MapIndexStorage$1.onDropFromCache(MapIndexStorage.java:67)
 at com.intellij.util.containers.SLRUMap$2.removeEldestEntry(SLRUMap.java:58)
 at com.intellij.util.containers.hash.LinkedHashMap.put(LinkedHashMap.java:98)
 at com.intellij.util.containers.SLRUMap.put(SLRUMap.java:91)
 at com.intellij.util.containers.SLRUCache.get(SLRUCache.java:41)
 at com.intellij.util.indexing.MapIndexStorage.read(MapIndexStorage.java:230)
 at com.intellij.util.indexing.MapIndexStorage.addValue(MapIndexStorage.java:250)
 at com.intellij.util.indexing.MemoryIndexStorage.addValue(MemoryIndexStorage.java:133)
 at com.intellij.util.indexing.MapReduceIndex.updateWithMap(MapReduceIndex.java:223)
 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.UnindexedFilesUpdater.processFile(UnindexedFilesUpdater.java:53)
 at com.intellij.openapi.project.CacheUpdateSession.processFile(CacheUpdateSession.java:92)
 at com.intellij.openapi.project.CacheUpdateRunner$3$1.run(CacheUpdateRunner.java:151)
 at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:697)
 at com.intellij.openapi.project.CacheUpdateRunner$3.run(CacheUpdateRunner.java:155)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:198)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:223)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:189)
 at com.intellij.openapi.project.CacheUpdateRunner.a(CacheUpdateRunner.java:130)
 at com.intellij.openapi.project.CacheUpdateRunner.processFiles(CacheUpdateRunner.java:88)
 at com.intellij.openapi.project.DumbServiceImpl$IndexUpdateRunnable$1.a(DumbServiceImpl.java:309)
 at com.intellij.openapi.project.DumbServiceImpl$IndexUpdateRunnable$1.run(DumbServiceImpl.java:289)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:428)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:198)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:223)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:189)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:343)
 at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:331)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)
 at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
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)
 ... 54 more
Caused by: java.lang.OutOfMemoryError: Map failed
 at sun.nio.ch.FileChannelImpl.$$YJP$$map0(Native Method)
 at sun.nio.ch.FileChannelImpl.map0(FileChannelImpl.java)
 at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:755)
 ... 55 more

Please sign in to leave a comment.