简体   繁体   中英

StackExchange.Redis StringGetAsync returns null value

Setup

Using 2 Redis Servers on Linux in Production

Using Sentinel for High Availability

StackExchange.Redis Nuget Package version is 1.2.6

.NET 4.5 Windows Service consumes the Redis Cache.

The windows service is under load balancer.

Application Flow

Step 1

The first request has an approval request going from the client to an endpoint. Unique Transaction ID is generated and stored (expiry is 60 mins) in the Redis Cache for the next amend request

Step 2 Amend request is sent by the client within minutes of approval request. The transaction id stored in the previous step needs to be retrieved from the Redis Service and attach to amend request to be sent to endpoint.

The issue we are facing is that during the amend request the unique transaction id retrieval fails and returns null value. We are using the StringGetAsync method to get the value from the Redis Cache. It works most of the times and some of them fail.

The two steps can be executed on any of the servers in the farm. We have logs to verify that the Setting the value in Redis Service returns true.

Redis logs information is limited to sync operations.

Need help on how to troubleshoot/solve this issue.

Thanks for the response. Upon further investigation found that the Sentinel Service was in stopped State in all the Redis Servers. Starting the Sentinel Service solved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM