This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE Dev (Build 201211270002) VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05 OS: Linux User Comments: GUEST: A project was scanning in the background Stacktrace: java.lang.IllegalStateException: this writer hit an OutOfMemoryError; cannot flush at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3599) at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3588) at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3567) at org.netbeans.modules.parsing.lucene.LuceneIndex$FlushIndexWriter.callFlush(LuceneIndex.java:1193) at org.netbeans.modules.parsing.lucene.LuceneIndex.txStore(LuceneIndex.java:399) at org.netbeans.modules.parsing.lucene.DocumentIndexImpl.store(DocumentIndexImpl.java:193)
Created attachment 128457 [details] stacktrace
In the heapdump there are millions of javascript fields and 152,000+ javascript documents. How many javascript files do you have in your project?
Project cloc Statistics ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- PHP 4557 138931 251362 693012 Javascript 780 54371 105576 206556 CSS 402 8147 7020 47513 HTML 872 5880 971 32590 XML 437 486 541 18150 XSD 62 1371 4050 15403 XSLT 20 445 279 2951 Smarty 11 3 0 664 SQL 26 112 60 644 Perl 2 57 76 535 DTD 4 38 54 200 Visual Basic 1 19 0 49 Bourne Shell 1 12 8 41 Pascal 2 14 37 25 ------------------------------------------------------------------------------- SUM: 7177 209886 370034 1018333 -------------------------------------------------------------------------------
It's seems to me very suspicious that 780 JS files generates more than 152,000 documents. Basically there should be 1 to 1 mapping among files and documents. I will talk about it with someone fro JS tomorrow. Basically I can prevent the OOM in general however the amount of documents is quite horrible compared to number of JS files or even all files.
Looking at the snapshot details there are 7 indexers, all of them has some reasonable number of documents in order of thousands (at most 20,000) except of the html indexer which has the rest nearly 100,000 documents. It's unclear if the documents are generated in several runs or in single run. I've added injectable request to schedule TX store asynchronously on the indexer, this will help if the documents are created in more runs. If all the documents are created in the single run it will not help and the HTML support needs to be fixed. Please wait until the changeset propagates into dev build (the message will be added by builder into tis issue) and verify it, thanks. fixed jet-main 34fdcb2ddf71
Integrated into 'main-golden', will be available in build *201212010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/34fdcb2ddf71 User: Tomas Zezula <tzezula@netbeans.org> Log: #222823:IllegalStateException: this writer hit an OutOfMemoryError; cannot flush
*** Bug 221885 has been marked as a duplicate of this bug. ***