编辑实际上,这根本没有修复,它恰好在更改后立即工作。我在这里迷路了。
我有一个社交媒体聚合器网站,它收集来自不同社交网站的媒体,并通过信号器将其推送给连接的用户。
这对我和大多数其他用户来说都非常有效,但我们拥有的最大客户之一是可靠连接问题。
以下链接几乎是同一个问题,此处的建议修补程序也适用于我:SignalR 2 long polling "protocol" request times out when not ran locally
我的问题是:除了这个客户,为什么这对其他所有人都有效?我假设它与他们的网络配置/代理/ vpn等有关。
我将客户端的超时时间增加到10秒,服务器端的超时时间增加到10秒,所以如果我理解正确,那么现在是超时20秒。
有人可以帮助解释可能导致我所看到的内容吗?他们的互联网速度并不慢,网站响应迅速,可能就像他们的网络配置和延迟一样简单吗?或某种代理会降低连接速度,导致默认设置出现问题?
我希望了解为什么这个修复似乎可以解决这个问题,我不愿意认为现在已经解决了,因为这对我来说似乎很奇怪。
我做出此更改之前的日志如下所示:
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
答案 0 :(得分:0)
我发现了问题,Chrome已经过时!!
客户端安装了版本37,现在有12个版本已经过时,因为它们是版本49(创建此帖子时的版本)
我安装了SignalR v2.1.1的早期版本,因为我听说这是一个非常稳定的版本,而其他人遇到了2.2版的问题
这也没有用,我没有得到保持活跃的ping并且连接会不断回收自己。
一旦我发现他们使用的chrome版本我只是安装了在chrome v37之后和v38之前发布的SignalR版本(幸运的是他们在这些版本之间完成了SignalR的发布。这简单地解决了这个问题。
我现在正致力于客户端将其版本更新为最新版本。祝我好运!