Out of memory error when trying to get the couch base client
Hi All,
We are getting the following error when we try to get the client this way :
client = new CouchbaseClient((CouchbaseConnectionFactory) cf);
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:633) ~[na:1.6.0_23]
at java.nio.DirectByteBuffer.(DirectByteBuffer.java:98) ~[na:1.6.0_23]
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288) ~[na:1.6.0_23]
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool$Preallocation.(SocketSendBufferPool.java:151) ~[netty-3.3.1.jar:na]
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool.(SocketSendBufferPool.java:38) ~[netty-3.3.1.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.(NioWorker.java:76) ~[netty-3.3.1.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.(NioClientSocketPipelineSink.java:76) ~[netty-3.3.1.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.(NioClientSocketChannelFactory.java:157) ~[netty-3.3.1.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.(NioClientSocketChannelFactory.java:103) ~[netty-3.3.1.jar:na]
at com.couchbase.client.vbucket.BucketMonitor.(BucketMonitor.java:101) ~[couchbase-client-1.1.jar:1.1-dp]
at com.couchbase.client.vbucket.ConfigurationProviderHTTP.subscribe(ConfigurationProviderHTTP.java:225) ~[couchbase-client-1.1.jar:1.1-dp]
at com.couchbase.client.CouchbaseClient.(CouchbaseClient.java:217) ~[couchbase-client-1.1.jar:1.1-dp]
Please let us know why this happens.
Thanks & Regards,
Divya
Hey,
Any Clue Yet? This out of memory is really Irritating. Our server crashed Several times and Now it's Not displaying Data. When checked with Disk Usage It showed me 7G data usage only by Couchbase with only 3000 Document... :( Crazy. A bit Digging I found this hope Someone might Help.....I have 5 Couchbase Buckets and 2 Memcached. And the Directory inside /opt/couchbase/var/lib/couchbase displayed like this [Trancated.....]
total 6.7G drwxr-xr-x 2 couchbase couchbase 4.0K May 21 06:47 config -rw------- 1 couchbase couchbase 384M May 18 09:59 core.10026 -rw------- 1 couchbase couchbase 427M May 21 06:16 core.10029 -rw------- 1 couchbase couchbase 384M May 18 10:01 core.10133 -rw------- 1 couchbase couchbase 384M May 18 10:02 core.10252 -rw------- 1 couchbase couchbase 384M May 18 10:04 core.10313 -rw------- 1 couchbase couchbase 384M May 18 10:06 core.10420 -rw------- 1 couchbase couchbase 376M May 18 10:07 core.10495 -rw------- 1 couchbase couchbase 384M May 18 10:09 core.10602 -rw------- 1 couchbase couchbase 384M May 18 10:11 core.10709 -rw------- 1 couchbase couchbase 385M May 18 10:14 core.10816 -rw------- 1 couchbase couchbase 384M May 18 10:23 core.10923 -rw------- 1 couchbase couchbase 384M May 18 10:24 core.11300 -rw------- 1 couchbase couchbase 384M May 18 10:35 core.11374 -rw------- 1 couchbase couchbase 384M May 18 10:36 core.11830 -rw------- 1 couchbase couchbase 384M May 18 10:41 core.11905 -rw------- 1 couchbase couchbase 384M May 18 10:43 core.12091 -rw------- 1 couchbase couchbase 384M May 18 10:53 core.12230 -rw------- 1 couchbase couchbase 384M May 18 10:54 core.12621 -rw------- 1 couchbase couchbase 329M May 18 10:55 core.12727 -rw------- 1 couchbase couchbase 384M May 18 10:58 core.12785 -rw------- 1 couchbase couchbase 436M May 18 11:29 core.13816 -rw------- 1 couchbase couchbase 384M May 18 11:33 core.14288 -rw------- 1 couchbase couchbase 384M May 18 11:40 core.14905 -rw------- 1 couchbase couchbase 384M May 18 11:41 core.15024 -rw------- 1 couchbase couchbase 384M May 18 11:42 core.15098 -rw------- 1 couchbase couchbase 384M May 18 11:46 core.15128 -rw------- 1 couchbase couchbase 384M May 18 11:50 core.15353 -rw------- 1 couchbase couchbase 384M May 18 11:51 core.15539 -rw------- 1 couchbase couchbase 385M May 18 11:54 core.15613 -rw------- 1 couchbase couchbase 376M May 18 11:55 core.15721 -rw------- 1 couchbase couchbase 384M May 18 11:57 core.15827 -rw------- 1 couchbase couchbase 384M May 18 12:00 core.15889 -rw------- 1 couchbase couchbase 384M May 18 12:02 core.16042 -rw------- 1 couchbase couchbase 307M May 21 06:58 core.16141 -rw------- 1 couchbase couchbase 384M May 18 12:03 core.16161 -rw------- 1 couchbase couchbase 384M May 18 12:06 core.16221 -rw------- 1 couchbase couchbase 384M May 18 12:08 core.16375 -rw------- 1 couchbase couchbase 384M May 18 12:10 core.16482 -rw------- 1 couchbase couchbase 384M May 18 12:13 core.16596 -rw------- 1 couchbase couchbase 241M May 21 06:59 core.16711 -rw------- 1 couchbase couchbase 240M May 21 07:00 core.16773 -rw------- 1 couchbase couchbase 240M May 21 07:02 core.16822 -rw------- 1 couchbase couchbase 240M May 21 07:04 core.16934 -rw------- 1 couchbase couchbase 46M May 21 07:22 core.16999 -rw------- 1 couchbase couchbase 385M May 15 06:59 core.19669 -rw------- 1 couchbase couchbase 436M May 17 13:49 core.21512 -rw------- 1 couchbase couchbase 384M May 15 08:01 core.22500 -rw------- 1 couchbase couchbase 385M May 17 04:09 core.22644 -rw------- 1 couchbase couchbase 384M May 18 08:31 core.5164 -rw------- 1 couchbase couchbase 385M May 18 08:32 core.5329 -rw------- 1 couchbase couchbase 385M May 18 08:34 core.5403 -rw------- 1 couchbase couchbase 384M May 18 08:35 core.5510 -rw------- 1 couchbase couchbase 384M May 18 09:07 core.5571 -rw------- 1 couchbase couchbase 376M May 18 09:08 core.7510 -rw------- 1 couchbase couchbase 384M May 18 09:13 core.7584 -rw------- 1 couchbase couchbase 328M May 18 09:14 core.7811 -rw------- 1 couchbase couchbase 385M May 18 09:16 core.7882 -rw------- 1 couchbase couchbase 384M May 18 09:17 core.7989 -rw------- 1 couchbase couchbase 384M May 18 09:19 core.8018 -rw------- 1 couchbase couchbase 384M May 18 09:27 core.8125 -rw------- 1 couchbase couchbase 384M May 18 09:28 core.8468 -rw------- 1 couchbase couchbase 384M May 18 09:29 core.8530 -rw------- 1 couchbase couchbase 385M May 18 09:33 core.8636 -rw------- 1 couchbase couchbase 384M May 18 09:34 core.8791 -rw------- 1 couchbase couchbase 384M May 18 09:36 core.8897 -rw------- 1 couchbase couchbase 384M May 18 09:37 core.8959 -rw------- 1 couchbase couchbase 384M May 18 09:39 core.9033
........................................................................Continues......
Any Idea??? Tried to Vacuum{Doesn't work}
[Edited]
Just saw Whenever I am getting any error from couchbase Web Console..... a File named core.RANDOM_ID is getting created....Is that needfull?
Ragards ...... {Me}
[EDIT]
I just realized i was using an older client version.
Will try the new one, sorry for the inconvenient
[/EDIT]
Hi, just reporting i got the same error, but when couchbase was running and processing requests for a few times.
While using the java api client.
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:658)
at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
at net.spy.memcached.protocol.TCPMemcachedNodeImpl.(TCPMemcachedNodeImpl.java:90)
at net.spy.memcached.protocol.binary.BinaryMemcachedNodeImpl.(BinaryMemcachedNodeImpl.java:51)
at net.spy.memcached.BinaryConnectionFactory.createMemcachedNode(BinaryConnectionFactory.java:67)
at net.spy.memcached.MemcachedConnection.createConnections(MemcachedConnection.java:141)
at net.spy.memcached.MemcachedConnection.(MemcachedConnection.java:128)
at com.couchbase.client.CouchbaseConnection.(CouchbaseConnection.java:62)
at com.couchbase.client.CouchbaseConnectionFactory.createConnection(CouchbaseConnectionFactory.java:101)
at net.spy.memcached.MemcachedClient.(MemcachedClient.java:193)
at com.couchbase.client.CouchbaseClient.(CouchbaseClient.java:155)
at com.couchbase.client.CouchbaseClient.(CouchbaseClient.java:124)
at com.couchbase.client.CouchbaseClient.(CouchbaseClient.java:76)
at breadcrumbs.web.cache.WPSAPI.connect(Unknown Source)
at breadcrumbs.web.cache.WPSAPI.(Unknown Source)
at breadcrumbs.web.cache.BreadCrawler.(Unknown Source)
at breadcrumbs.web.cache.BreadCache.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Anyone know why/how it happens?