{"action":"created","issue":{"url":"https://api.github.com/repos/redisson/redisson/issues/2314","repository_url":"https://api.github.com/repos/redisson/redisson","labels_url":"https://api.github.com/repos/redisson/redisson/issues/2314/labels{/name}","comments_url":"https://api.github.com/repos/redisson/redisson/issues/2314/comments","events_url":"https://api.github.com/repos/redisson/redisson/issues/2314/events","html_url":"https://github.com/redisson/redisson/issues/2314","id":491945085,"node_id":"MDU6SXNzdWU0OTE5NDUwODU=","number":2314,"title":"Graceful handling of failures for Redisson Tomcat Session Manager","user":{"login":"howarddsouzaw","id":55157150,"node_id":"MDQ6VXNlcjU1MTU3MTUw","avatar_url":"https://avatars1.githubusercontent.com/u/55157150?v=4","gravatar_id":"","url":"https://api.github.com/users/howarddsouzaw","html_url":"https://github.com/howarddsouzaw","followers_url":"https://api.github.com/users/howarddsouzaw/followers","following_url":"https://api.github.com/users/howarddsouzaw/following{/other_user}","gists_url":"https://api.github.com/users/howarddsouzaw/gists{/gist_id}","starred_url":"https://api.github.com/users/howarddsouzaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howarddsouzaw/subscriptions","organizations_url":"https://api.github.com/users/howarddsouzaw/orgs","repos_url":"https://api.github.com/users/howarddsouzaw/repos","events_url":"https://api.github.com/users/howarddsouzaw/events{/privacy}","received_events_url":"https://api.github.com/users/howarddsouzaw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-09-10T23:31:06Z","updated_at":"2019-09-18T12:57:18Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPlease consider to take commercial 24x7 support included in PRO version https://redisson.pro\r\n-->\r\nI am using Redisson's Tomcat9 session manager going against Azure Redis Cache\r\nwith readMode=MEMORY and updateMode=DEFAULT .\r\nThis is mainly for session failover in case a server fails. Sessions are sticky, and so during normal operation, all session reads should be local within Tomcat.\r\n\r\nOccasionally all of our Tomcat instances experience Netty timeout errors and requests to Redis fail.  This causes a complete failure of the application, as sessions are unavailable. This failure seems unnecessary, since the session data is available in local Tomcat memory and is not dependent on Redis (except in the case of failover)\r\n\r\nIs there any way to get Redisson session manager to circuit break if calls to Redis fail or time out, and fall back to using session data from local memory ? The exception is below. Any help would be appreciated. Thanks!\r\n\r\nSep 05, 2019 1:09:58 AM org.redisson.tomcat.RedissonSessionManager findSession\r\nSEVERE: Can't read session object by id: 36D02EC9371A380BBA8A8A6C7BAC6C37\r\norg.redisson.client.RedisTimeoutException: Unable to send command! Try to increase 'nettyThreads' and/or connection pool size settings Node source: NodeSource [slot=null, addr=null, redisClient=null, redirect=null, entry=MasterSlaveEntry [masterEntry=[freeSubscribeConnectionsAmount=0, freeSubscribeConnectionsCounter=value:49:queue:0, freeConnectionsAmount=9, freeConnectionsCounter=value:63:queue:0, freezed=false, freezeReason=null, client=[addr=rediss://sessions-redis.redis.cache.windows.net:6380], nodeType=MASTER, firstFail=0]]], connection: RedisConnection@310983480 [redisClient=[addr=rediss://sessions-redis.redis.cache.windows.net:6380], channel=[id: 0x51576dba, L:/10.23.152.48:49800 - R:sessions-redis.redis.cache.windows.net/137.116.35.20:6380], currentCommand=CommandData [promise=RedissonPromise [promise=ImmediateEventExecutor$ImmediatePromise@3f0a0e71(failure: java.util.concurrent.CancellationException)], command=(PUBLISH), params=[p-bs:redisson:tomcat_session_updates:/auth, PooledUnsafeDirectByteBuf(freed)], codec=org.redisson.client.codec.StringCodec]], command: (HMGET), params: [p-bs:redisson:tomcat_session:36D02EC9371A380BBA8A8A6C7BAC6C37, PooledUnsafeDirectByteBuf(ridx: 0, widx: 24, cap: 256), PooledUnsafeDirectByteBuf(ridx: 0, widx: 13, cap: 256), PooledUnsafeDirectByteBuf(ridx: 0, widx: 24, cap: 256), PooledUnsafeDirectByteBuf(ridx: 0, widx: 27, cap: 256), PooledUnsafeDirectByteBuf(ridx: 0, widx: 15, cap: 256), PooledUnsafeDirectByteBuf(ridx: 0, widx: 20, cap: 256)] after 3 retry attempts\r\n\tat org.redisson.command.CommandAsyncService$6.run(CommandAsyncService.java:714)\r\n\tat io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:682)\r\n\tat io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:757)\r\n\tat io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:485)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n\r\n\r\n \r\n### Expected behavior\r\nRedisson Session Manager should fail gracefully and fall back to local memory if Redis calls fail, and Tomcat requests should succeed\r\n\r\n### Actual behavior\r\nAll Tomcat requests that use the http session data fail\r\n\r\n### Steps to reproduce or test case\r\nIssue is intermittent, but occurs when calls to Netty time out \r\n\r\n### Redis version\r\nAzure Cache for Redis\r\n\r\n### Redisson version\r\n3.11.0\r\n\r\n### Redisson configuration\r\n\r\nsingleServerConfig:\r\n  idleConnectionTimeout: 10000\r\n  connectTimeout: 10000\r\n  timeout: 3000\r\n  retryAttempts: 3\r\n  retryInterval: 1500\r\n  subscriptionsPerConnection: 5\r\n  clientName: null\r\n  subscriptionConnectionMinimumIdleSize: 1\r\n  subscriptionConnectionPoolSize: 50\r\n  connectionMinimumIdleSize: 10\r\n  connectionPoolSize: 64\r\n  database: 0\r\n  dnsMonitoringInterval: 35000\r\nthreads: 16\r\nnettyThreads: 32\r\ncodec: !<org.redisson.codec.FstCodec> {}\r\ntransportMode: \"NIO\"\r\n"},"comment":{"url":"https://api.github.com/repos/redisson/redisson/issues/comments/532671880","html_url":"https://github.com/redisson/redisson/issues/2314#issuecomment-532671880","issue_url":"https://api.github.com/repos/redisson/redisson/issues/2314","id":532671880,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMjY3MTg4MA==","user":{"login":"howarddsouzaw","id":55157150,"node_id":"MDQ6VXNlcjU1MTU3MTUw","avatar_url":"https://avatars1.githubusercontent.com/u/55157150?v=4","gravatar_id":"","url":"https://api.github.com/users/howarddsouzaw","html_url":"https://github.com/howarddsouzaw","followers_url":"https://api.github.com/users/howarddsouzaw/followers","following_url":"https://api.github.com/users/howarddsouzaw/following{/other_user}","gists_url":"https://api.github.com/users/howarddsouzaw/gists{/gist_id}","starred_url":"https://api.github.com/users/howarddsouzaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howarddsouzaw/subscriptions","organizations_url":"https://api.github.com/users/howarddsouzaw/orgs","repos_url":"https://api.github.com/users/howarddsouzaw/repos","events_url":"https://api.github.com/users/howarddsouzaw/events{/privacy}","received_events_url":"https://api.github.com/users/howarddsouzaw/received_events","type":"User","site_admin":false},"created_at":"2019-09-18T12:57:18Z","updated_at":"2019-09-18T12:57:18Z","author_association":"NONE","body":"Thank you, I will try that."}}
{"actor":{"display_login":"howarddsouzaw"}}