Hey, thank you for all your help, I could likely fix the problem.
Unfortunately I needed 10 hours to find the error (1 line of code) ;-) I forgot to close the IndexSearcher after an index query, so, I think, lots of instances of IndexSearchers (one for every query) were hold in the memory. This caused the OutofMemoryException during the rebuild method. In the old version of our application the RAMIndex was built new every night, so the OutofMemoryException was never a problem. But now, without throwing the existing index away, the instances of the Searcher were hold in Memory until the end of the days (or the server crashes) I added a IndexSearcher.close() to the query method and until now the error does not occur again. Best wishes Marcel -----Ursprüngliche Nachricht----- Von: karl wettin [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 24. Januar 2007 16:41 An: java-user@lucene.apache.org Betreff: Re: modifier.optimize() causes Java heap space (OutOfMemoryException) 24 jan 2007 kl. 16.16 skrev Michael McCandless: > A couple ideas to verify / try: You can also use a profiler to see what is hogging the resources. I personally prefere JProfiler as it plugs right in to my IDE. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]