EOFException with async client of nioEventLoop

Using aerospike Java client 4.0.6

aerospike server 3.14.1.2

Repeatedly getting following exception :

com.aerospike.client.AerospikeException: java.io.EOFException at com.aerospike.client.async.NioEventLoop.processKey(NioEventLoop.java:276) at com.aerospike.client.async.NioEventLoop.runCommands(NioEventLoop.java:206) at com.aerospike.client.async.NioEventLoop.run(NioEventLoop.java:165) Caused by: java.io.EOFException at com.aerospike.client.async.NioConnection.read(NioConnection.java:112) at com.aerospike.client.async.NioCommand.read(NioCommand.java:240) at com.aerospike.client.async.NioEventLoop.processKey(NioEventLoop.java:254) … 2 more Even if I am following the steps mentioned in aerospike website for async client http://www.aerospike.com/docs/client/java/usage/async

On debugging deep I found it is from class :com.aerospike.client.async.NioConnection

method :

public boolean read(ByteBuffer byteBuffer) throws IOException {
    while (byteBuffer.hasRemaining()) {
        int len = socketChannel.read(byteBuffer);

        if (len == 0) {         
            // Got would-block.
            return false;
        }

        if (len < 0) {
            // Server has shutdown socket.
            throw new EOFException();
        }
    }`
    return true;
}

But not getting any configuration to fix it.

discusses this issue to some extent.

How to tell server not to close connection or if connection is closed the open it. Application waits for about 3 mins before giving exception.

Not my area of expertise … based on what I have read, you should set application side timeout to 55 seconds.

https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/ClientPolicy.html#maxSocketIdle

Server timeout to close socket on no activity is set at 60 seconds. Don’t increase this or you may run out of file handles.

Are you using Enterprise Edition? If so, use your 24/7 included support and open a support ticket.