为什么我的应用程序在一段时间后断开连接? (带SSE的桌面浏览器)

时间:2013-05-17 04:03:21

标签: signalr

这似乎发生在大多数桌面浏览器中。当连接仍在运行且仍在接收消息时,客户端日志记录会捕获此类活动:

[20:26:45 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:26:45 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:26:45 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=B%2C23%7C7%2C0%7C8%2C0%7C9%2C0&tid=10'
[20:26:47 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:26:47 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:26:47 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=B%2C23%7C7%2C0%7C8%2C0%7C9%2C0&tid=9'
[20:26:49 GMT-0500 (Central Daylight Time)] SignalR: EventSource timed out trying to connect
[20:26:49 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 0
[20:26:50 GMT-0500 (Central Daylight Time)] SignalR: EventSource connected

它可以保持运行很长一段时间,超过20-30分钟或更长时间。但是当EventSource readyState从0变为2并且它永远不会恢复时,麻烦就开始了:

[20:34:48 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 0
[20:34:48 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting due to the server connection ending
[20:34:50 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:34:50 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:34:50 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=BT%2C3%7CBU%2C0%7CBV%2C0%7CBW%2C0&tid=3'
[20:34:53 GMT-0500 (Central Daylight Time)] SignalR: EventSource timed out trying to connect
[20:34:53 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 2
[20:34:55 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:34:55 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:34:55 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=BT%2C3%7CBU%2C0%7CBV%2C0%7CBW%2C0&tid=7'
[20:34:58 GMT-0500 (Central Daylight Time)] SignalR: EventSource timed out trying to connect
[20:34:58 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 2
[20:35:00 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:35:00 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:35:00 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=BT%2C3%7CBU%2C0%7CBV%2C0%7CBW%2C0&tid=2'
[20:35:03 GMT-0500 (Central Daylight Time)] SignalR: EventSource timed out trying to connect
[20:35:03 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 2
[20:35:05 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:35:05 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:35:05 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=BT%2C3%7CBU%2C0%7CBV%2C0%7CBW%2C0&tid=7'
[20:35:08 GMT-0500 (Central Daylight Time)] SignalR: EventSource timed out trying to connect
[20:35:08 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 2
[20:35:10 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:35:10 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:35:10 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=BT%2C3%7CBU%2C0%7CBV%2C0%7CBW%2C0&tid=6'
[20:35:13 GMT-0500 (Central Daylight Time)] SignalR: EventSource timed out trying to connect
[20:35:13 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 2
[20:35:15 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()
[20:35:15 GMT-0500 (Central Daylight Time)] SignalR: EventSource reconnecting
[20:35:15 GMT-0500 (Central Daylight Time)] SignalR: Attempting to connect to SSE endpoint 'http://www.mysite.com/signalr?transport=serverSentEvents&connectionToken=6m-VvbPcIRx9eRBMBms9uNsT5bQOZPkRZmiyHPGYZJUba52h9ys9n1TYdywkehezJM-N3x6HbOJLWNU9m3pFDb1PDxMDn79O3CLY72O6eI0Cgzb_bzowfvfJw9TKTeYl0&connectionData=%5B%7B%22name%22%3A%22mysitehub%22%7D%5D&messageId=BT%2C3%7CBU%2C0%7CBV%2C0%7CBW%2C0&tid=2'
[20:35:18 GMT-0500 (Central Daylight Time)] SignalR: EventSource timed out trying to connect
[20:35:18 GMT-0500 (Central Daylight Time)] SignalR: EventSource readyState: 2
[20:35:20 GMT-0500 (Central Daylight Time)] SignalR: Couldn't reconnect within the configured timeout (30000ms), disconnecting.
[20:35:20 GMT-0500 (Central Daylight Time)] SignalR: Stopping the monitoring of the keep alive
[20:35:20 GMT-0500 (Central Daylight Time)] SignalR: EventSource calling close()

这是从Firefox中捕获的,但它也发生在Chrome中。我相信,在Arvixe上托管的实际Web应用程序并不会因为30000ms或更长时间而“变暗”。如何开始解决这样的问题?

0 个答案:

没有答案