gpt4 book ai didi

c# - SignalR 2.2 回退传输耗尽 - 连接不可靠

转载 作者:太空宇宙 更新时间:2023-11-03 15:24:54 24 4
gpt4 key购买 nike

修改 其实这个根本不是固定的,只是改了之后马上就生效了。我在这里迷路了。

我有一个社交媒体聚合网站,它从不同的社交网站收集媒体并通过信号器将其推送给连接的用户。

这对我和大多数其他用户来说效果很好,但我们最大的客户之一在可靠连接方面遇到了问题。

以下链接几乎是同一个问题,此处建议的修复方法也适用于我:SignalR 2 long polling "protocol" request times out when not ran locally

我的问题是:为什么这对除了这个客户以外的其他人都有效?我假设这与他们的网络配置/代理/vpn 等有关。

我将客户端的超时时间增加到 10 秒,将服务器端的超时时间增加到 10 秒,所以如果我理解正确的话,现在是 20 秒的超时时间。

有人可以帮助解释是什么导致了我所看到的吗?他们的网速不慢,网站 react 灵敏,难道就跟他们的网络配置和延迟一样简单吗?还是某种会减慢连接速度以导致默认设置出现问题的代理?

我想了解为什么这个修复似乎解决了这个问题,我不愿意认为现在已经解决了,因为这对我来说似乎很奇怪。

我进行此更改之前的日志如下所示:

SignalR: Client subscribed to hub 'myhub'.
SignalR: Negotiating with '/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D'.
SignalR: serverSentEvents transport starting.
SignalR: Attempting to connect to SSE endpoint 'signalr/connect?transport=serverSentEvents&clie…3gsDmCzfkA%3D%3D&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D&tid=7'.
SignalR: EventSource connected.
SignalR: serverSentEvents transport connected. Initiating start request.
SignalR: serverSentEvents transport failed during the start request. Stopping the connection.
SignalR: Stopping connection.
SignalR: EventSource calling close().
SignalR: Fired ajax abort async = true.
SignalR: The start request aborted because connection.stop() was called.
SignalR: Client subscribed to hub 'myhub'.
SignalR: Negotiating with '/signalr/negotiate?clientProtocol=1.5&connectionToken=ubEjncDXPj0%2BF6YsbdPGaBRMoRKpb6b2rmP96H8I8dzoNNrQuG3hzvmBmcvTeocMXMKphG7WAYx%2B5CXWZqHTQzQ0Ix4Q0oY8WSGBbrK0Gg642QUJ4H2CP%2F%2F%2BZeWf6s9gpW6VsbAmlu453gsDmCzfkA%3D%3D&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D'.
SignalR: serverSentEvents transport starting.
SignalR: Attempting to connect to SSE endpoint '/signalr/connect?transport=serverSentEvents&clie…jsKYjxsjjQ%3D%3D&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D&tid=2'.
SignalR: EventSource connected.
SignalR: serverSentEvents transport connected. Initiating start request.
SignalR: serverSentEvents transport failed during the start request. Stopping the connection.
SignalR: Stopping connection.
SignalR: EventSource calling close().
SignalR: Fired ajax abort async = true.
SignalR: The start request aborted because connection.stop() was called.
SignalR: Client subscribed to hub 'myhub'.
SignalR: Negotiating with '/signalr/negotiate?clientProtocol=1.5&connectionToken=gOOVxYvgb3S%2Fd2lHGesc%2BqQmm26O5E0sA72Sctx3HXaKmZniWL2LokTGYF7QTpGEInG2%2B%2FiscmTx%2BfA0JWbMB6oJkgWEJ0zd2zlJdvy8BpZsDaJXIBK3pIEZxognlA6qsOECLf5IEY%2BrjsKYjxsjjQ%3D%3D&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D'.
SignalR: serverSentEvents transport starting.
SignalR: Attempting to connect to SSE endpoint '/signalr/connect?transport=serverSentEvents&clie…QWnHGdfTg%3D%3D&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D&tid=10'.
SignalR: serverSentEvents transport timed out when trying to connect.
SignalR: EventSource calling close().
SignalR: serverSentEvents transport failed to connect. Attempting to fall back.
SignalR: foreverFrame transport starting.
SignalR: Forever Frame is not supported by SignalR on browsers with SSE support.
SignalR: foreverFrame transport failed to connect. Attempting to fall back.
SignalR: longPolling transport starting.
SignalR: Opening long polling request to '/signalr/connect?transport=longPolling&clientPro…YXqliyLQWnHGdfTg%3D%3D&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D'.
SignalR: longPolling transport timed out when trying to connect.
SignalR: Aborted xhr request.
SignalR: longPolling transport failed to connect. Attempting to fall back.
SignalR: Fallback transports exhausted.
SignalR: Stopping connection.
SignalR: Fired ajax abort async = true.

在我做出改变之后:

SignalR: Client subscribed to hub 'myhub'.
SignalR: Negotiating with '/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D'.
SignalR: serverSentEvents transport starting.
SignalR: Attempting to connect to SSE endpoint '/signalr/connect?transport=serverSentEvents&clie…Ck0cV1%2Fg%3D%3D&connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D&tid=1'.
SignalR: EventSource connected.
SignalR: serverSentEvents transport connected. Initiating start request.
SignalR: The start request succeeded. Transitioning to the connected state.
SignalR: Now monitoring keep alive with a warning timeout of 6666.666666666666, keep alive timeout of 10000 and disconnecting timeout of 15000

最佳答案

我发现了问题,Chrome 已过时!!

客户端安装了 37 版,现在已经过时了 12 个版本,因为它们是 49 版(创建这篇文章时的版本)

我安装了早期版本的 SignalR v2.1.1,因为我听说这是一个非常稳定的版本,而其他人对版本 2.2 有疑问

这也不起作用,我没有收到保持事件状态的 ping,连接会不断地自行回收。

一旦我发现了他们使用的 chrome 版本,我就简单地安装了 chrome v37 之后和 v38 之前发布的 SignalR 版本(幸运的是,他们在这些版本之间发布了 SignalR。这简单地解决了这个问题。

我现在正在处理客户端,将他们的版本更新到最新版本。祝我好运!

关于c# - SignalR 2.2 回退传输耗尽 - 连接不可靠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35770607/

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