gpt4 book ai didi

azure - 无法连接 Azure Redis 缓存

转载 作者:行者123 更新时间:2023-12-03 05:47:24 27 4
gpt4 key购买 nike

我完全厌倦了具有功能的 Azure Redis 缓存。

下面的“测试代码”行在控制台应用程序中工作,但不适用于 Azure Functions。

IConnectionMultiplexer connection = ConnectionMultiplexer.Connect("**********rediscache.redis.cache.windows.net:6380,password=nFpm1oIiyP8ZiCxC/WMcxaFRzGo4yMgWDYZksQgqO4U=,ssl=True,abortConnect=False");
IDatabase database = connection.GetDatabase();
bool isConnected = connection.IsConnected;
var test = database.HashExists("key", "fieldKey");
database.HashSet("key", "fieldKey", "test");

database.StringSet("Key", "Value");
var result = database.StringGet("Key");
connection.Close();

使用 Visual Studio 中的 Azure 函数

Nuget - StackExchange.Redis 2.0.505 & Microsoft.NET.Sdk.Functions 1.0.22

 Exception while executing function: Function1. StackExchange.Redis: 
No connection is available to service this operation: HEXISTS key;
UnableToConnect on
catamsrediscache.redis.cache.windows.net:6380/Interactive,
Flushed, last: ECHO, origin: ResetNonConnected, outstanding: 9, last-read:
5s ago, last-write: 0s ago, unanswered-write: 0s ago, keep-alive: 60s,
state: ConnectedEstablishing, mgr: 10 of 10 available, last-heartbeat:
never, global:
0s ago, v: 2.0.505.18761; IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER:
(Busy=2,Free=1021,Min=4,Max=1023), Local-CPU: n/a. UnableToConnect on
catamsrediscache.redis.cache.windows.net:6380/Interactive, Flushed, last:
ECHO, origin: ResetNonConnected, outstanding: 9, last-read: 5s ago,
last-write: 0s ago, unanswered-write: 0s ago, keep-alive: 60s, state:
ConnectedEstablishing, mgr: 10 of 10 available, last-heartbeat: never,
global: 0s ago, v: 2.0.505.18761.

有人知道为什么这个错误只出现在函数中吗?

最佳答案

这看起来几乎与 this reported issue 相同在 StackExchange.Redis GitHub 页面上。我建议您跟进您的错误详细信息,以帮助他们诊断您遇到的问题。

关于azure - 无法连接 Azure Redis 缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52479531/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com