Home > Back-end >  Spring integration redis always quote timeout exception Command timed out after 5 second (s)
Spring integration redis always quote timeout exception Command timed out after 5 second (s)

Time:11-26


As title, springboot integrate redis is always an exception is thrown when the org. Springframework. Dao. QueryTimeoutException: redis command timed out. Nested exception is IO. Lettuce. Core. RedisCommandTimeoutException: Command timed out after 5 second (s),
The above 5 second (s) said the timeout for 5 seconds, this is what I set the maximum waiting time, at first I thought it was too short time, then I added to 50 seconds still didn't solve the problem, we have a solution?

Note: the project has just started when redis connection is no problem, but after a period of time will appear connection timeout problem, error pictures below


Application. Yml configuration file content

CodePudding user response:

The host is the IP, port is port, the password is the password
Not sure you @ redis configuration file. What does it really mean for the host @

Anyway make sure redis is really up

CodePudding user response:

reference 1/f, salty hum restaurant reply:
host is the IP, port is port, the password is the password
Not sure you @ redis configuration file. What does it really mean for the host @

Anyway make sure redis is indeed under the

No relationship between the ah, don't ask a question have to tell you all the reids host IP and password?

CodePudding user response:

Can be connected at the beginning, the basic rule out a firewall, what redis itself, it can consider the connection pool Settings a bit bigger, is the Max - active that, and then set a read timeout

And then can monitor the number of connections, is the active connections, springboot don't know how to use, but should be very different, the number of connections can be got directly from the jedis

CodePudding user response:

refer to the second floor JavaEngineering response:
Quote: reference 1/f, salty hum restaurant reply:

The host is the IP, port is port, the password is the password
Not sure you @ redis configuration file. What does it really mean for the host @

Anyway make sure redis is indeed under the

No relationship between the ah, don't ask a question have to tell you all the reids host IP and password?


The diao temper... The other people all not care you.

CodePudding user response:

I also do you have in this case, I was java11, SpringBoot is version 2.11, the server install Redis in remote, local test of time also is such, in five to ten minutes not connect without operation will shut down all the connection, then will lead to the phenomenon of a connection timeout, I also struggle for several days no problem, what did you find a solution?????

CodePudding user response:

Met the same problem is solved, please use the cache is read directly from the database faster...

CodePudding user response:

reference 5 floor QQ914237918 reply:
I also appeared the situation, you is my java11, SpringBoot is version 2.11, install Redis server in the remote and local test of time also is such, in five to ten minutes not connect without operation will shut down all the connection, then will lead to the phenomenon of a connection timeout, I also struggle for several days no problem, what did you find a solution?????

Is solved, please I like you

CodePudding user response:

refer to 6th floor iyiio response:
met the same problem is solved, please use the cache is read directly from the database faster...

Add QQ,
See if our environment has a problem,

CodePudding user response:

refer to the eighth floor QQ914237918 response:
Quote: refer to the sixth floor iyiio response:

Met the same problem is solved, please use the cache is read directly from the database faster...

Add QQ,
See if our environment has a problem,

I switch to jedis pool, not temporarily in the first overtime

CodePudding user response:

references 9 f iyiio response:
Quote: refer to the eighth floor QQ914237918 response:

Quote: refer to the sixth floor iyiio response:

Met the same problem is solved, please use the cache is read directly from the database faster...

Add QQ,
See if our environment has a problem,

I switch to jedis pool, not temporarily in the first overtime


Don't use the lettuce the connection pool?

CodePudding user response:

reference 4 floor qazwsxhai response:
Quote: refer to the second floor JavaEngineering response:

Quote: reference 1/f, salty hum restaurant reply:

The host is the IP, port is port, the password is the password
Not sure you @ redis configuration file. What does it really mean for the host @

Anyway make sure redis is indeed under the

No relationship between the ah, don't ask a question have to tell you all the reids host IP and password?


The diao temper... People are not care you.

I wipe, speak so good, must be requested

CodePudding user response:

There is a solution yao wrote a heartbeat packets 10 seconds request at a time but this is not serious way I talk about

CodePudding user response:

refer to the second floor in a dairy, response:
Quote: reference 1/f, salty hum restaurant reply:

The host is the IP, port is port, the password is the password
Not sure you @ redis configuration file. What does it really mean for the host @

Anyway make sure redis is indeed under the

No relationship between the ah, don't ask a question have to tell you all the reids host IP and password?

I also encountered this problem, but they don't want to tell you

CodePudding user response:

I also encountered such a problem, the lettuce is held by the connection pool

But the spring. Redis. Lettuce. Pool. Min - idle value from 0 to 1, is no longer an error

CodePudding user response:

@ a dairy, this problem with you? B: and I met, 4 days, very punctual

CodePudding user response:

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related