Closed GoogleCodeExporter closed 9 years ago
What version of the client are you using, this may already be fixed.
see issue #20, this should be fixed in r22 and above (started reusing the same
stream context)
If this isn't the same bug and isn't fixed by a newer version, then it may be a
regression and I'd appreciate if you could followup with more information.
Thanks.
Original comment by donovan....@gmail.com
on 4 Feb 2011 at 2:46
I'm using the r22 version, and the memory leaks each time you call the
addDocuments method.
Using the same stream context doesn't seem to fix PHP leaking the memory usage
each time the stream context is used.
Original comment by nicolas....@gmail.com
on 4 Feb 2011 at 3:48
Are you using a single client instance for all indexing operations, or are you
creating a lot of instances? If you're using a single instance, you should see
your memory stay rather constant. If you're creating a lot of instances then
the stream contexts will accumulate - since php never gets rid of them.
If you're creating lots of instances, then even if the post body is cleared
each time, you'd still have a leakage problem, just to a lesser degree.
Original comment by donovan....@gmail.com
on 4 Feb 2011 at 4:12
Current implementation of file get contents based http transport does already
clear the post body after the request:
http://code.google.com/p/solr-php-client/source/browse/branches/http_requests/Ap
ache/Solr/HttpTransport/FileGetContents.php?r=53#168
Perhaps you could consider upgrading from r22 to HEAD (r53 currently)
Original comment by donovan....@gmail.com
on 4 Feb 2011 at 4:25
I'm using only one instance of the client and the leak is pretty clear (around
4Mb after each call to addDocuments).
I could go for the last revision, you are right.
My PHP version is 5.2.6 (debian lenny - maybe that is the reason), but i'd
advise anyone who won't/can't take the chance to upgrade to the last revision
to try the fix i gave.
It really makes the deal for me.
Original comment by nicolas....@gmail.com
on 5 Feb 2011 at 7:07
this problem was already fixed in source, but there was no more current
download than r22 at the time. Now there is the r60 download, so I'm going to
close this.
Original comment by donovan....@gmail.com
on 20 May 2011 at 12:13
Original issue reported on code.google.com by
nicolas....@gmail.com
on 4 Feb 2011 at 11:03