简体   繁体   English

雷迪森客户端; RedisTimeoutException 问题

[英]Redisson client ; RedisTimeoutException issue

I am using Google cloud managed redis cluster(v5) via redisson(3.12.5)我正在通过redisson(3.12.5)使用Google cloud managed redis cluster(v5) )

Following are my SingleServer configurations in yaml file以下是我在 yaml 文件中的SingleServer配置

singleServerConfig:
    idleConnectionTimeout: 10000
    connectTimeout: 10000
    timeout: 3000
    retryAttempts: 3
    retryInterval: 1500
    password: null
    subscriptionsPerConnection: 5
    clientName: null
    address: "redis://127.0.0.1:6379"
    subscriptionConnectionMinimumIdleSize: 1
    subscriptionConnectionPoolSize: 50
    connectionMinimumIdleSize: 40
    connectionPoolSize: 250
    database: 0
    dnsMonitoringInterval: 5000
threads: 0
nettyThreads: 0
codec: !<org.redisson.codec.JsonJacksonCodec> {}

I am getting following exceptions when I increase the load on my application当我增加应用程序的负载时出现以下异常

org.redisson.client.RedisTimeoutException: Unable to acquire connection! Increase connection pool size and/or retryInterval settings Node source: NodeSource 

org.redisson.client.RedisTimeoutException: Command still hasn't been written into connection! Increase nettyThreads and/or retryInterval settings. Payload size in bytes: 34. Node source: NodeSource 

It seems there is no issue on redis cluster and i think i need to make tweaking in my client side redis connection pooling confs(mentioned above) to make it work. redis 集群似乎没有问题,我认为我需要在客户端 redis 连接池配置(如上所述)中进行调整以使其工作。

Please suggest me the changes i need to make in my confs请建议我需要在我的 confs 中进行的更改

I am also curious if I should close the Redis connection after making get/set calls.我也很好奇是否应该在进行 get/set 调用后关闭Redis连接。 I have tried finding this but found nothing conclusive on how to close Redis connections我试过找到这个,但没有发现关于如何关闭Redis连接的结论

One last thing that I want to ask is that is there any mechanism to get Redis connection pool stats(active connection, idle connection etc ) in Redisson我想问的最后一件事是,是否有任何机制可以在Redisson中获取Redis连接池统计信息(活动连接、空闲连接等)

Edit1:编辑1:

I have tried by changing values following values in 3 different iterations我已经尝试通过在 3 次不同的迭代中更改以下值

Iteration 1:迭代 1:

 idleConnectionTimeout: 30000
 connectTimeout: 30000
 timeout: 30000

Iteration 2:迭代 2:

nettyThreads: 0

Iteration 3:迭代 3:

connectionMinimumIdleSize: 100
connectionPoolSize: 750

I have tried these things but nothing has worked for me我已经尝试过这些东西,但没有任何东西对我有用

Any help is appreciated.任何帮助表示赞赏。

Thanks in advance提前致谢

Assuming you are getting low memory alerts on your cache JVM.假设您在缓存 JVM 上收到低 memory 警报。

You may have to analyze the traffic and determine 2 things您可能需要分析流量并确定两件事

  1. Too many parallel cache persists.过多的并行缓存仍然存在。
  2. Huge chunk of data being persisted.大量数据被持久化。

Both can be determined by the traffic on your server.两者都可以由服务器上的流量决定。

For option 1 configuring pool-size would solve you issue, but for option 2 you may have to refactor your code to persist data in smaller chunks.对于选项 1,配置池大小可以解决您的问题,但对于选项 2,您可能必须重构代码以将数据保存在较小的块中。

Try to set nettyThreads = 64 settings尝试设置nettyThreads = 64设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试从 App Runner 连接到 AWS ElasticCache Redis 时出现 RedisTimeoutException - RedisTimeoutException when trying to connect to AWS ElasticCache Redis from App Runner Google Recaptcha Enterprise:创建服务客户端问题 - Google Recaptcha Enterprise: Create Service Client issue Symfony 4 S3Client::factory 问题:“找不到类 Aws\S3\S3Client” - Symfony 4 S3Client::factory issue: 'class Aws\S3\S3Client not found' 为什么我会收到“客户端尚未准备好发出请求” - 调度 function 调用 Firestore get() 失败 - Why do I get "Client is not yet ready to issue requests" - Firestore get() fails when called by Schedule function 将 com.microsoft.graph.requests.GraphServiceClient 与 azure 身份的客户端凭据提供程序一起使用时出现问题 - Issue while using com.microsoft.graph.requests.GraphServiceClient with Client credentials provider of azure identity 亚马逊 MWS 客户端库 - Amazon MWS client libraries 支持 TLS 的 Memcached 客户端? - Memcached client with TLS support? client = boto3.client('eventbridge') 出现错误 - getting error for client = boto3.client('eventbridge') 通过 Client Secret 或 Client Certificate 识别应用程序 - Identify an app by Client Secret or Client Certificate 推荐的客户方式 - Recommended way to make a client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM