FAQ
hi,

environment: lucene 2.4, jdk 1.6

i'm using quartz jobs to schedule indexing tasks; currently i'm creating a
new instance of an analyzer each time i open the index; after some time i'm
getting a out of memory;

Analyzer Class:
private ThreadLocal tokenStreams;

since the analyzer class is using a thread local -> should i reuse an
analyzer (e.g singleton pattern) in this case (quartz job reusing threads
(=tread pool) -> thread local data never gets freed)...)?

Mem dump:

Class name
Shallow Heap | Retained Heap | Percentage
--------------------------------------------------------------------------------------------------------------------------------------
org.quartz.simpl.SimpleThreadPool$WorkerThread @ 0xb4e8070
QuartzScheduler_Worker-3 Thread| 120 | 55.914.144 | 21,65%
- java.lang.ThreadLocal$ThreadLocalMap @ 0xdf32a20
24 | 55.913.760 | 21,65%
'- java.lang.ThreadLocal$ThreadLocalMap$Entry[16384] @ 0x163a61b8
65.552 | 55.913.736 | 21,65%
- java.lang.ThreadLocal$ThreadLocalMap$Entry @ 0xe090ca8
32 | 9.608 | 0,00%
- org.apache.lucene.analysis.StopAnalyzer$SavedStreams @ 0xe090cc8
24 | 9.560 | 0,00%
- org.apache.lucene.analysis.LowerCaseTokenizer @ 0xe090ce0
32 | 8.520 | 0,00%
......
......

thanks

--
View this message in context: http://www.nabble.com/ThreadLocal---Memory-Problems-with-Analyzer-class-tp22241132p22241132.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Rviper at Feb 27, 2009 at 8:20 am
    ok, also see https://issues.apache.org/jira/browse/LUCENE-1186


    --
    View this message in context: http://www.nabble.com/ThreadLocal---Memory-Problems-with-Analyzer-class-tp22241132p22241327.html
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedFeb 27, '09 at 8:04a
activeFeb 27, '09 at 8:20a
posts2
users1
websitelucene.apache.org

1 user in discussion

Rviper: 2 posts

People

Translate

site design / logo © 2022 Grokbase