Issues

ZF-3892: memory leak in Zend_Search_Lucene->find ?

Issue Type: Bug Created: 2008-08-08T01:21:24.000+0000 Last Updated: 2012-05-19T07:11:14.000+0000 Status: Open Fix version(s): Reporter: Marko Konttinen (markok08) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Search_Lucene

  • zf-crteam-padraic
  • zf-crteam-priority

Related issues: Attachments:

Description

I posted about the same issue to the forums yesterday:

I ran into a strange problem using Zend Search Lucene. It seems to me that the function Zend_Search_Lucene::find has a memory leak. When running several queries in a row it might result in the program running out of memory in the worst case scenario, which is my case and lead me to notice this problem.

Here is a simple piece of code to illustrate the problem and to replicate my findings:

for($i=0;$i<100;$i++){ $index = new Zend_Search_Lucene($pathToIndex); $index->find("gabba gabba hey!"); print memory_get_usage()."\n"; }

I far as I understand memory-consumption should remain relatively constant but now it increases steadily throughout the iterations. I even tried explicitly unsetting the $index with unset($index) but it didn't help. Is it a bug in Zend Search Lucene or am I missing something? Has anybody ran into something similar yet?

I have now tested Zend Framework versions 1.5.1, 1.5.3 and 1.6.0 RC 1 as well and the same problem persists in both of them.

I am using PHP 5.2.5 in linux.

Comments

Posted by Benjamin Eberlei (beberlei) on 2008-11-08T00:38:37.000+0000

Is this maybe an issue of circular references that PHP cannot resolve in versions < 5.3?

Posted by ranjith (ranjithu02) on 2012-05-19T07:11:14.000+0000

Is this issue resolved ? Actually I am facing same issue, for every find operation 100MB space is allocating but the same memory is not de-allocating after request processing...

Please let me know the solution if any body knows..

Thanks in advance.

-Ranjith

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts