Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception thrown while writing bytes to server on set #91

Open
santoshsgithub opened this issue Dec 11, 2018 · 1 comment
Open

exception thrown while writing bytes to server on set #91

santoshsgithub opened this issue Dec 11, 2018 · 1 comment

Comments

@santoshsgithub
Copy link

I am using version 3.0.2. Memcached server version is 1.4.26. I have a legacy system where I want to increase the memcached slab size to 5 MB. When I try to add/set object size more than 1 MB in memcached then I am getting below exception

Dec 11, 2018 12:13:31 PM com.schooner.MemCached.BinaryClient set
SEVERE: ++++ exception thrown while writing bytes to server on set
Dec 11, 2018 12:13:31 PM com.schooner.MemCached.BinaryClient set
SEVERE: Connection reset by peer
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:466)
at com.schooner.MemCached.SockOutputStream.writeToChannel(Unknown Source)
at com.schooner.MemCached.SockOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1842)

Implement WhalinMemcachedJavaClient example :

private static void implementWhalinMemcachedJavaClient() {
      String[] servers = { "127.0.0.1:11211" };
      SockIOPool sockIOPool = SockIOPool.getInstance("SanTest");

     sockIOPool.setMinConn(2);
     sockIOPool.setMaxConn(20);
     sockIOPool.setServers(servers);
     sockIOPool.setFailover(true);
     sockIOPool.setInitConn(30);
     sockIOPool.setMaintSleep(90);
     sockIOPool.setSocketTO(2000);
     sockIOPool.setAliveCheck(true);
     sockIOPool.setHashingAlg(SockIOPool.NATIVE_HASH);
     sockIOPool.initialize();

     MemCachedClient whalinClient = new MemCachedClient("SanTest", true);
     //MemCachedClient whalinClient = new MemCachedClient("SanTest");

     whalinClient.add("Result", "Success");

     System.out.println("get Result=" + whalinClient.get("Result"));
}
@aleksandarlabus
Copy link

@santoshsgithub Do you have any solution for this issue?

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

No branches or pull requests

2 participants