Search code examples
redisycsb

Error in loading data in Redis From YCSB


I am Trying to load data in redis server from ycsb load data command. It is working Fine with 1 Million records but when am trying to load more data like 250 million records then it is running for some time and after that it show error in loading by giving following exception. Can anybody suggest where am going wrong ?

Am getting following error :

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out at redis.clients.jedis.Protocol.process(Protocol.java:74) at redis.clients.jedis.Protocol.read(Protocol.java:122) at redis.clients.jedis.Connection.getIntegerReply(Connection.java:178) at redis.clients.jedis.Jedis.zadd(Jedis.java:1448) at com.yahoo.ycsb.db.RedisClient.insert(RedisClient.java:97) at com.yahoo.ycsb.DBWrapper.insert(DBWrapper.java:148) at com.yahoo.ycsb.workloads.CoreWorkload.doInsert(CoreWorkload.java:461) at com.yahoo.ycsb.ClientThread.run(Client.java:269)

Thanks


Solution

  • It sounds like the problem is a timeout. It's not surprising considering the huge workload you defined.

    You could try to modify the way YCSB connects to Redis, to add a longer timeout than the default one.

    In com.yahoo.ycsb.db.RedisClient, replace

    jedis = new Jedis(host, port);
    

    with

    jedis = new Jedis(host, port, TIMEOUT);
    

    With TIMEOUT being an integer. The default value in Jedis is 2000, which I assume means 2 seconds.