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: [email protected]
For additional commands, e-mail: [email protected]