Renchunbing / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
1 stars 0 forks source link

Client leaks memory #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Perform a lot of delete requests using 10 threads which share a single 
memcache client instance. We use a pool size of 5.

What is the expected output? What do you see instead?
The JVM heap grows and memory is not reclaimed after garbage collection.

What version of the product are you using? On what operating system?
xmemcached 1.3.1. Java version 1.6.22.

Please provide any additional information below.
The attached file contains a screenshot of leaked objects.

Original issue reported on code.google.com by scamurcu...@gmail.com on 17 Mar 2011 at 4:15

Attachments:

GoogleCodeExporter commented 9 years ago
What's your method used for deleting?
deleteWithNoReplay?

If you use deleteWithNoReply,the requests will be sent to memcached without 
waiting for response,so if xmc can not send requests as fast as you call 
deleteWithNoReply,there would be much more request commands in sending 
queue,and OOM if there is not enough memory.

Original comment by killme2...@gmail.com on 23 Mar 2011 at 12:41

GoogleCodeExporter commented 9 years ago
Yes, you're right, after a bit more investigation we've understood that we're 
sending too many delete requests at once (about 5 million) with noReply, and 
therefore we get out of memory error. We'll have to find a way to throttle 
these requests. You can close this issue.

Thanks for the help.

Original comment by scamurcu...@gmail.com on 23 Mar 2011 at 12:54

GoogleCodeExporter commented 9 years ago
Thanks for your report.

Original comment by killme2...@gmail.com on 23 Mar 2011 at 1:04