Tag: 沙发基地

CouchBase客户端无法缓存小于20mb的对象。 超时错误

我正在使用CouchBase客户端(couchbase-client-1.4.3)将我的序列化POJO(4mb-8mb大小的对象) concurrently缓存到Couchbase服务器中。 for(upto 20 itertarions){ new Thread().start().. //this thread cache the objects Thread.sleep(500); // the less sleep time, the more cache failures 🙁 } 我有2个复制的服务器。 客户端可以缓存小型对象,但是当对象大小增加时,它会抛出exception。 Caused by: net.spy.memcached.internal.CheckedOperationTimeoutException: Timed out waiting for operation – failing node: 192.168.0.1/192.168.0.2:11210 at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:167) at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:140)` 我发现了类似的问题和答案。 但是,由于使用couchbase客户端的应用程序存在内存问题,我不能升级我的内存。 我怎么试过添加-XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=500等JVM参数-XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=500 这就是我创建couchBase缓存客户端的方法 CouchbaseConnectionFactoryBuilder cfb = new CouchbaseConnectionFactoryBuilder(); cfb.setFailureMode(FailureMode.Retry); cfb.setMaxReconnectDelay(5000); […]