nfhu / xmemcached

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

OOM Error while decompressing 60 KB of actuall data #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Store a data of size more than 16 KB
2. Fetch the data with 225 parallel threads for about half an hour
3. There will be OOM Error,
Caused by: java.lang.OutOfMemoryError
        at java.util.zip.Deflater.init(Native Method)         at java.util.zip.Deflater.<init>(Deflater.java:124)
        at java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:46)         at
java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:58)
        at net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.compress(BaseSerializingTranscoder.java:113)
        at
com.yahoo.ugccloud.dal.memcached.MemcachedSerializingTranscoder.encode(Memcached
SerializingTranscoder.java:177)
        at net.rubyeye.xmemcached.command.text.TextStoreCommand.encodeValue(TextStoreCommand.java:171)
        at net.rubyeye.xmemcached.command.text.TextStoreCommand.encode(TextStoreCommand.java:126)
        at net.rubyeye.xmemcached.impl.MemcachedTCPSession.wrapMessage(MemcachedTCPSession.java:128)

What is the expected output? What do you see instead?
We should not get OOM error when there is plenty of OS memory available.

What version of the product are you using? On what operating system?
xmemcached-1.2.1_1,
$ uname -a
Linux friendnote-dr.eglbp.corp.yahoo.com 2.6.9-67.EL #1 Wed Nov 7 13:41:13 EST 
2007 i686 (RHEL-4)
The issue could be re-produced with latest xmemcachedd-1.2.5

Please provide any additional information below.

Suspecting that ZipInputStream.close() is not called, which is leaking the  
system resources. Reference, http://bugs.sun.com/view_bug.do?bug_id=4797189

Also documentation says it indeed releases the system resources,

http://cupi2.uniandes.edu.co/site/images/recursos/javadoc/j2se/1.5.0/docs/api/ja
va/util/zip/ZipInputStream.html#close%28%29

<snip>
close

public void close()
           throws IOException

    Closes this input stream and releases any system resources associated with the stream. 
</snip>

Documentation mentions that close is needed to release system resources.

Original issue reported on code.google.com by cegganes...@gmail.com on 13 Oct 2010 at 5:39

GoogleCodeExporter commented 9 years ago

Original comment by killme2...@gmail.com on 15 Oct 2010 at 1:16

GoogleCodeExporter commented 9 years ago
Xmemcached 1.2.6 has been released,please try it.

Original comment by killme2...@gmail.com on 17 Oct 2010 at 5:53

GoogleCodeExporter commented 9 years ago
Please use 1.2.6.1, 1.2.6 is not a valid version.

Original comment by killme2...@gmail.com on 17 Oct 2010 at 7:08