Comments (4)
Spring Data Redis hosts multiple connection pools. There are separate pools for reactive and for synchronous usage. Also, if your application uses the Cluster API to run commands on specific nodes, then there's a third pool being created.
Please also keep in mind that Cluster connections consist of multiple connections to the individual Redis Cluster nodes.
If you observe a regular disconnect after 5 minutes, then it seems that some active network component disconnects idle connections. Please watch out for Lettuce logs mentioning disconnects and connection watchdog attempting reconnects.
from spring-data-redis.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
from spring-data-redis.
@mp911de Thank you for your assistance. I have an additional question. I experimented with not using a connection pool and instead utilizing a shared native connection for our redis cluster, while also enabling eager initialization. Here is our setup.
connectionFactory.setShareNativeConnection(true);
connectionFactory.setEagerInitialization(true);
connectionFactory.afterPropertiesSet();
I noticed some logs indicating that a shared connection was created during bean initialization. However, when a new EC2 node starts up and begins serving traffic, we observe a significant number of Redis command timeout errors. Interestingly, these errors only occur for the first few requests, and afterward, they no longer appear.
Due to the at least 5-minute gap between bean initialization and the node actually starting to serve traffic, is it possible that the shared native connection closed during this time interval? However, we have not set any timeout from the server side. Do you have any insights into why these peculiar Redis command timeout errors only occur during node startup?
from spring-data-redis.
Due to the at least 5-minute gap between bean initialization and the node actually starting to serve traffic, is it possible that the shared native connection closed during this time interval?
If Redis is configured to drop a connection, then yes, this might happen. Watch closely the debug log to determine what is happening on the transport level.
from spring-data-redis.
Related Issues (20)
- threw exception; nested exception is java.lang.NoClassDefFoundError: redis/clients/jedis/GeoUnit HOT 1
- After timeout occurs on MULTI call every following transaction fails HOT 13
- Allow RedisConnectionFactories to be initialized as part of the context lifecycle
- Upgrade to Lettuce 6.3.2.RELEASE
- Cache reference documentation does not use variable HOT 1
- missing _class causes failure when deserializing to ObjectRecord again since version 3.0.0
- Release 3.1.11 (2023.0.11)
- Release 3.2.5 (2023.1.5)
- Release 3.3 RC1 (2024.0.0)
- Failed to use Java records as projections in Spring Data Redis repository HOT 2
- getClusterConnection.clusterGetNodes always return 1 node HOT 1
- Invalid links on the Overview tab HOT 1
- For GenericJackson2JsonRedisSerializer use custom NullValueSerializer HOT 1
- Let `QueryByExampleRedisExecutor` implement `ListQueryByExampleExecutor` HOT 1
- Index value for `@Index` column not removed after setting value to `null`
- `ReactiveKeyCommands.Exists` to check multiple key existence HOT 4
- is not supported for Redis query derivation HOT 1
- why pipeliningFlushPolicy default is not flushOnClose? HOT 8
- RedisTemplate.hasKey() Behavior Change with setEnableTransactionSupport = true HOT 1
- Pipelined usage of Redis Cluster with Lettuce fails for some commands that return `PipelinedRedisFuture` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-redis.