当前位置:网站首页>Record a redis timeout
Record a redis timeout
2022-07-25 15:15:00 【The south wind knows what I mean】
Project scenario :
Spark Streaming Task consumption kafka, hold offsets Deposit in redis
Problem description
The main bug:
ERROR yarn.ApplicationMaster: User class threw exception: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
at redis.clients.jedis.util.RedisInputStream.ensureFill(RedisInputStream.java:204)
at redis.clients.jedis.util.RedisInputStream.readByte(RedisInputStream.java:42)
at redis.clients.jedis.Protocol.process(Protocol.java:126)
at redis.clients.jedis.Protocol.read(Protocol.java:192)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:316)
at redis.clients.jedis.Connection.getOne(Connection.java:298)
at redis.clients.jedis.Connection.executeCommand(Connection.java:123)
at redis.clients.jedis.Jedis.set(Jedis.java:4725)
at cn.huorong.utils.RedisUtils$.$anonfun$writeOffset$3(RedisUtils.scala:45)
at scala.collection.immutable.Map$Map1.foreach(Map.scala:128)
at cn.huorong.utils.RedisUtils$.writeOffset(RedisUtils.scala:40)
at cn.huorong.run.SampleTaskSinkHbaseMapping.$anonfun$sink$1(SampleTaskSinkHbaseMapping.scala:51)
at cn.huorong.run.SampleTaskSinkHbaseMapping.$anonfun$sink$1$adapted(SampleTaskSinkHbaseMapping.scala:17)
at org.apache.spark.streaming.dstream.DStream.$anonfun$foreachRDD$2(DStream.scala:629)
at org.apache.spark.streaming.dstream.DStream.$anonfun$foreachRDD$2$adapted(DStream.scala:629)
at org.apache.spark.streaming.dstream.ForEachDStream.$anonfun$generateJob$2(ForEachDStream.scala:51)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at org.apache.spark.streaming.dstream.DStream.createRDDWithLocalProperties(DStream.scala:417)
at org.apache.spark.streaming.dstream.ForEachDStream.$anonfun$generateJob$1(ForEachDStream.scala:51)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.Try$.apply(Try.scala:213)
at org.apache.spark.streaming.scheduler.Job.run(Job.scala:39)
at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler.$anonfun$run$1(JobScheduler.scala:256)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler.run(JobScheduler.scala:256)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
Cause analysis :
redis colony Caused by excessive load redis Connection timeout , The program is down
Solution :
increase redis Time is enough
//connectionTimeout Connection timeout ( Default 2000ms)
private val redis: Jedis = new Jedis(HOST, PORT,100000)
边栏推荐
- 浏览器工作流程(简化)
- "Ask every day" reentrantlock locks and unlocks
- How much memory can a program use at most?
- Browser workflow (Simplified)
- JS 同步、异步,宏任务、微任务概述
- Tasks, micro tasks, queues and scheduling (animation shows each step of the call)
- 记一次Spark foreachPartition导致OOM
- Vscode plugin collection
- Detailed explanation of lio-sam operation process and code
- ES5写继承的思路
猜你喜欢

一个程序最多可以使用多少内存?

oracle_ 12505 error resolution

Single or multiple human posture estimation using openpose

VS2010 add WAP mobile form template

什么是物联网

反射-笔记

Docker上运行redis以配置文件方式启动,连接客户端报错Error: Server closed the connection

Deployment and simple use of PostgreSQL learning

解决DBeaver SQL Client 连接phoenix查询超时

防抖(debounce)和节流(throttle)
随机推荐
Leetcode combination sum + pruning
SQL Server forcibly disconnects
Promise object and macro task, micro task
浏览器工作流程(简化)
图片裁剪cropper 示例
Automatically set the template for VS2010 and add header comments
Pl/sql creates and executes ORALCE stored procedures and returns the result set
LeetCode第 303 场周赛
MFC 线程AfxBeginThread基本用法,传多个参数
继承的实现过程及ES5和ES6实现的区别
System. Accessviolationexception: an attempt was made to read or write to protected memory. This usually indicates that other memory is corrupted
VMware Workstation fails to start VMware authorization service when opening virtual machine
Image cropper example
剑指Offer | 二进制中1的个数
"How to use" observer mode
[Android] recyclerview caching mechanism, is it really difficult to understand? What level of cache is it?
redis淘汰策列
"How to use" agent mode
Vs2010添加wap移动窗体模板
Detailed explanation of lio-sam operation process and code