文本已收錄至個人GitHub倉庫,歡迎Star:github.com/bin39232820…
種一棵樹最好的時間是十年前,其次是如今
我知道不少人不玩qq了,可是懷舊一下,歡迎加入六脈神劍Java菜鳥學習羣,羣聊號碼:549684836 鼓勵你們在技術的路上寫博客java
原本打算是準備着一支菸 一杯咖啡 一個bug寫一天的,可是一來公司,運維就把昨天生產線的日誌懟過來講,線上報錯了。。。git
2020-03-24 03:35:39.486 ERROR --- [ForkJoinPool.commonPool-worker-0] com.hq.tiku.sync.bw.listener.ClassPlainListenter Line:101 - 同步消息隊列push.userClassplan.tiku出現異常ClassPlanEntity(classplanId=2c7cc389822b4181a591c9890a2d3eeb, teacherId=276, teacherName=陳文文, teacherTeam=null, userId=18658702, className=2020年初級衝剌班, courseId=2900, courseNo=2020005CJ, courseName=2020年初級會計實務衝刺階段, classplanName=2020年初級會計實務(衝刺階段), classId=5864, tkUserId=null, courseTkNo=null, planNum=null)
org.springframework.data.redis.RedisSystemException: Redis exception; nested exception is io.lettuce.core.RedisException: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 855638016 byte(s) of direct memory (used: 985661440, max: 1823473664)
at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:74)
at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41)
at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)
at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:257)
at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.convertLettuceAccessException(LettuceStringCommands.java:718)
at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.set(LettuceStringCommands.java:143)
at org.springframework.data.redis.connection.DefaultedRedisConnection.set(DefaultedRedisConnection.java:231)
at org.springframework.data.redis.core.DefaultValueOperations$3.inRedis(DefaultValueOperations.java:202)
at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:59)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:224)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:95)
at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:198)
at com.hq.tiku.sync.bw.listener.ClassPlainListenter.lambda$synClassPlan$0(ClassPlainListenter.java:92)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.Nodes$ArrayNode.forEach(Nodes.java:684)
at java.util.stream.ForEachOps$ForEachOrderedTask.onCompletion(ForEachOps.java:490)
at java.util.concurrent.CountedCompleter.tryComplete(CountedCompleter.java:577)
at java.util.stream.ForEachOps$ForEachOrderedTask.onCompletion(ForEachOps.java:505)
at java.util.concurrent.CountedCompleter.tryComplete(CountedCompleter.java:577)
at java.util.stream.ForEachOps$ForEachOrderedTask.onCompletion(ForEachOps.java:505)
at java.util.concurrent.CountedCompleter.tryComplete(CountedCompleter.java:577)
at java.util.stream.ForEachOps$ForEachOrderedTask.doCompute(ForEachOps.java:483)
at java.util.stream.ForEachOps$ForEachOrderedTask.compute(ForEachOps.java:400)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: io.lettuce.core.RedisException: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 855638016 byte(s) of direct memory (used: 985661440, max: 1823473664)
at io.lettuce.core.LettuceFutures.awaitOrCancel(LettuceFutures.java:125)
at io.lettuce.core.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:62)
at io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80)
at com.sun.proxy.$Proxy227.set(Unknown Source)
at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.set(LettuceStringCommands.java:141)
... 23 common frames omitted
複製代碼
上面是報錯的信息,這個模塊是一個同步模塊,代碼同事寫的,就是把一些數據經過mq同步到數據庫去,上面報錯的就是由於堆外內存不夠了,failed to allocate 855638016 byte(s) of direct memory (used: 985661440, max: 1823473664)github
首先我定位到代碼處,把代碼拿出來康康web
在Rediss操做的時間報錯了,而後網上各類百度,還真沒找到具體的緣由,不過本身定位了個大概。以爲有如下可能redis
其實也沒啥,就是本身記錄一下一些東西,哈哈。不過有大佬碰到的能夠下面留言哦。spring
好了各位,以上就是這篇文章的所有內容了,能看到這裏的人呀,都是真粉。數據庫
創做不易,各位的支持和承認,就是我創做的最大動力,咱們下篇文章見運維
六脈神劍 | 文 【原創】若是本篇博客有任何錯誤,請批評指教,不勝感激 !學習