Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28C0E9543 for ; Wed, 19 Oct 2011 11:19:11 +0000 (UTC) Received: (qmail 62389 invoked by uid 500); 19 Oct 2011 11:19:09 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 62348 invoked by uid 500); 19 Oct 2011 11:19:09 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 62340 invoked by uid 99); 19 Oct 2011 11:19:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2011 11:19:09 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tamara.bobic@scai.fraunhofer.de designates 153.96.1.56 as permitted sender) Received: from [153.96.1.56] (HELO iron02.fraunhofer.de) (153.96.1.56) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2011 11:19:02 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlsAAOWwnk6ZYQcai2dsb2JhbABEhHWUTw+PISIBAQEKCwsbJYFuAQEFIys3DxEEAQEDAiYCMxQKCAYBBwcEARwEh2EGolORf4EwgR+EOIEUBJN+ijCHKQ X-IronPort-AV: E=Sophos;i="4.69,371,1315173600"; d="scan'208";a="32411282" Received: from mail-mtas26.fraunhofer.de ([153.97.7.26]) by iron02.fraunhofer.de with ESMTP/TLS/RC4-SHA; 19 Oct 2011 13:18:40 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMAADGxnk7Br6eCgWdsb2JhbABEhHWUTw+PISIBARYmJYFuAQEFIys3DxEEAQEDAiYCMxQKCAYBBwcEARwEh2EGolGRf4EwgR+EOIEUBJN+ijCHKQ X-IronPort-AV: E=Sophos;i="4.69,371,1315173600"; d="scan'208";a="46276345" Received: from kso.scai.fraunhofer.de ([193.175.167.130]) by mail-mtaS26.fraunhofer.de with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Oct 2011 13:18:39 +0200 Received: from zimbra.scai.fraunhofer.de (zimbra.scai.fraunhofer.de [129.26.133.5]) by kso.scai.fraunhofer.de (8.13.5+/8.13.5) with ESMTP id p9JBIvnE024550; Wed, 19 Oct 2011 13:18:57 +0200 (CEST) Date: Wed, 19 Oct 2011 13:18:34 +0200 (CEST) From: Tamara Bobic To: java-user@lucene.apache.org, Otis Gospodnetic Subject: Re: OutOfMemoryError Message-ID: <966afa13-62d7-4f9d-ac53-bb3f6eb6a021@zimbra.scai.fraunhofer.de> In-Reply-To: <1318972452.51425.YahooMailNeo@web130120.mail.mud.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Originating-IP: [129.26.133.198] X-Mailer: Zimbra 7.1.0_GA_3140 (ZimbraWebClient - FF3.0 (Linux)/7.1.0_GA_3140) Thank you all (Otis, Mead, Uwe) for your replies! It was very helpful and the problem turned out to be very trivial. I was ru= nning 32-bit java instead of 64-bit and not enough memory could be reserved= . Thanks once again, I finally managed to do the whole run successfully :) All the best, Tamara ----- Original Message ----- > From: "Otis Gospodnetic" > To: java-user@lucene.apache.org > Sent: Tuesday, October 18, 2011 11:14:12 PM > Subject: Re: OutOfMemoryError > > Bok Tamara, > > You didn't say what -Xmx value you are using. =C2=A0Try a little higher > value. =C2=A0Note that loading field values (and it looks like this one > may be big because is compressed) from a lot of hits is not > recommended. > > Otis > ---- > Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch > Lucene ecosystem search :: http://search-lucene.com/ > > > >________________________________ > >From: Tamara Bobic > >To: java-user@lucene.apache.org > >Cc: Roman Klinger > >Sent: Tuesday, October 18, 2011 12:21 PM > >Subject: OutOfMemoryError > > > >Hi all, > > > >I am using Lucene to query Medline abstracts and as a result I get > >around 3 million hits. Each of the hits is processed and > >information from a certain field is used. > > > >After certain number of hits, somewhere around 1 million (not always > >the same number) I get OutOfMemory exception that looks like this: > > > >Exception in thread "main" java.lang.OutOfMemoryError > >=C2=A0=C2=A0=C2=A0 at java.util.zip.Inflater.inflateBytes(Native Method)= > >=C2=A0=C2=A0=C2=A0 at java.util.zip.Inflater.inflate(Inflater.java:221) > >=C2=A0=C2=A0=C2=A0 at java.util.zip.Inflater.inflate(Inflater.java:238) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.document.CompressionTools.decompres= s(CompressionTools.java:108) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.index.FieldsReader.uncompress(Field= sReader.java:609) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.index.FieldsReader.addField(FieldsR= eader.java:385) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.index.FieldsReader.doc(FieldsReader= .java:231) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.index.SegmentReader.document(Segmen= tReader.java:1013) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.index.DirectoryReader.document(Dire= ctoryReader.java:520) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.index.FilterIndexReader.document(Fi= lterIndexReader.java:149) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.index.IndexReader.document(IndexRea= der.java:947) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.search.IndexSearcher.doc(IndexSearc= her.java:152) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 org.apache.lucene.search.MultiSearcher.doc(MultiSearc= her.java:156) > >=C2=A0=C2=A0=C2=A0 at org.apache.lucene.search.Hits.doc(Hits.java:180) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 de.fhg.scai.bio.tamara.corpusBuilding.LuceneCmdLineIn= terface.queryMedline(LuceneCmdLineInterface.java:178) > >=C2=A0=C2=A0=C2=A0 at > >=C2=A0=C2=A0=C2=A0 de.fhg.scai.bio.tamara.corpusBuilding.LuceneCmdLineIn= terface.main(LuceneCmdLineInterface.java:152) > > > > > >this line which causes problems is: > >String docText =3D hits.doc(j).getField("DOCUMENT").stringValue() ; > > > >I am using java 1.6 and I tried solving this issue with different > >garbage collectors (-XX:+UseParallelGC and -XX:+UseParallelOldGC) > >but it didn't help. > > > >Does anyone have any idea how to solve this problem? > > > >There is also an official bug report: > >http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D6293787 > > > >Help is much appreciated. :) > > > >Best regards, > >Tamara Bobic > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > >For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org