[MXS-4105] Queries on already established connections hanging for 15min when Redis server disconnected hard Created: 2022-04-20  Updated: 2023-04-04  Resolved: 2022-06-03

Status: Closed
Project: MariaDB MaxScale
Component/s: cache
Affects Version/s: 6.2.4
Fix Version/s: 6.4.0

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Johan Wikman
Resolution: Fixed Votes: 1
Labels: None

Sprint: MXS-SPRINT-157, MXS-SPRINT-158

 Description   

In a test setup with Maxscale and Redis on separate VMs shutting down the Redis service, or even killing the redis-server process the hard way with "kill -9", does not affect Maxscale and its clients that much, queries are just being sent right to a backend server each time without caching.

When powering off the whole Redis VM on the other hand so that the TCP connection to Redis is still open and just inactive from the Maxscale perspective already established client sessions hang on the next query they try to execute until finally running into a timeout.

The same would probably also happen when having a network failure between Maxscale and Redis servers.



 Comments   
Comment by markus makela [ 2022-04-21 ]

Changing to a Bug since this doesn't seem like something that's a new feature.

Comment by Johan Wikman [ 2022-06-03 ]

The behavior is the same if a docker container in which Redis is running is paused.

Now, the a specified timeout (default 5 seconds) is applied to all Redis operations. If a timeout error occurs, then the cache will be bypassed for an additional timeout seconds, after which an attempt to use Redis is again done. If that operation again fails with a timeout error, then the cache will be bypassed for 2 * timeout, after which an attempt to use Redis is again done. The period during which the cache is bypassed is increased by timeout until 60 seconds is reach, after which an attempt to use Redis is made once a minute until it succeeds.

Generated at Thu Feb 08 04:26:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.