Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

maximum memory of twemcache #17

Closed
typd opened this issue Nov 7, 2012 · 5 comments
Closed

maximum memory of twemcache #17

typd opened this issue Nov 7, 2012 · 5 comments

Comments

@typd
Copy link

typd commented Nov 7, 2012

Hi,
I found the service may extend maximum memory with "set" then "get",
twemcache -d -m 20
test script
import memcache
mc = memcache.Client(['localhost:11211'])
i = 0
while True:
i+=1
key = value = str(i)
mc.set(key, value)
mc.get(key)

The memory size keeps increasing and extends the maximum. Is it an issue with some internal data structure?

thanks

@thanhcnn2000
Copy link

I get the same problem that I set -m to 512 but the real resident memory size of the process is (viewed by ps command) increasing time by time after it passes limit 512

@sceoy
Copy link

sceoy commented Nov 25, 2012

it is a bug brought by 2.5.2. There is a memory leak when they switch the cas_suffix strategy (bcoz initially it will only alloc memory when return_cas so as free cache, now it will alloc memory any way but the free strategy keep the same). You could use 2.5.1 for a tricky fix. Or change the mc_connection.c and mc_core.c to make it release the suffix cache in all cases.

@thanhcnn2000
Copy link

Thanks you for your supporting us. We are looking forward to next release.

@thinkingfish
Copy link
Contributor

Thanks for pointing out the problem, this bug has been fixed in the 2.5.3 release. Please let us know if you are running into similar problems.

@thinkingfish
Copy link
Contributor

I want to apologize for claiming this being fixed. Apparently it wasn't fixed for all cases and the claim was prematured. Now I've root-caused the bug and tested all cases, a proper fix will come very soon with another release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants