springboot集成redis,压测报错;

当用jmeter压测时候,报的该错;

image
这是堆外内存溢出:
image

切换使用jedis的方案

  • 排除lettuce,同时添加jedis依赖
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
    <exclusions>
        <exclusion>
            <groupId>io.lettuce</groupId>
            <artifactId>lettuce-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>

<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>
</dependency>
  • 再次压测,就没有那个异常了
posted @ 2021-06-06 08:44  卡卡罗特琪琪  阅读(137)  评论(0编辑  收藏  举报