RUI个人博客 首页>>jedis

j2Cache线上异常问题排查记录

j2Cache线上异常问题排查记录

问题背景 开发反馈,线上有个服务在运行一段时间后,就会抛异常导致redis缓存不可用。项目使用了j2Caceh,异常是j2Cache的RedisCacheProvider抛出来的,如: Exception in thread \"main\" redis.clients.jedis.exceptions.JedisException: Could not get a resource from the poolat redis.clients.util.Pool.getResource(Pool.java:51)at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99)at net.oschina.j2cache.redis.RedisCacheProvider.getResource(RedisCacheProvider.ja...

阅读全文 »

spring集成redis客户端jedis以及redisson

spring集成redis客户端jedis以及redisson

集成jedis实例,xml方式 集成前引用的jar !--kl add redis client-- dependency groupIdredis.clients/groupId artifactIdjedis/artifactId version2.9.0/version /dependency !-- https://mvnrepository.com/artifact/commons-pool/commons-pool -- dependency groupIdorg.apache.commons/groupId artifactIdcommons-pool2/artifactId version2.2/version /dependency spring bean配置xml ?xml version="1.0" encoding="UTF-8"? beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSc...

阅读全文 »