I noticed, that after some time, the live updates on an opened Stack Exchange page stops to come and I need to press F5 in order to get an update. After the refresh, the live feed starts normally for some time.

I often have several Stack Exchange sites open in the same time.

Is it a client issue (Firefox) or is intentional behavior for lower server load? And if the later, on what conditions the live feed is stopped?

  • Is this related? – rene Oct 26 '13 at 10:12
  • 1
    @rene: Why would that be? The 'View more comments' link is a AJAX request, not a websocket request. – Martijn Pieters Oct 26 '13 at 10:18
  • I have no idea how everything works under the hood but there are similarities. The view more comments link can be an ajax call but I assumed it is triggered by an event coming from a websocket. This question and the question I linked both state that the issue occurs 'after some time'. I'm only trying ro connect the dots. If the line I did draw is wrong or unrelated so be it. – rene Oct 26 '13 at 10:27
  • 2
    I can reproduce this on Firefox 22.0 on windows 7 with a kasperski firewall – Richard Tingle Oct 26 '13 at 10:45
  • @rene when new comments arrive you're right, the websocket connection is responsible to push the link into the page. But when there are enough comments already (more than 5 I think) the link will always appear on page load and clicking it triggers AJAX request, unrelated to the sockets. :) – Shadow Wizard Wearing Mask Oct 27 '13 at 9:53

No, this is not intentional behaviour.

The Stack Exchange network uses websockets for the live refresh; if the socket is closed for some reason then those updates stop.

There is no policy in place to stop these automatically, but sockets can close if your (local) network connection has problems or if there is a firewall in place that closes long-running sockets after a while.

Test your websocket capability on http://websocketstest.com/; this does not test for timeouts or troublesome network connections, but perhaps the tests there fail whenever you lose connection on Stack Overflow as well.

| improve this answer | |
  • 1
    So, it is client issue, right? – johnfound Oct 26 '13 at 11:16
  • 1
    Exactly; it's a problem on your side, I am afraid. – Martijn Pieters Oct 26 '13 at 11:19
  • Well, not so important. I only wanted to know. :) – johnfound Oct 26 '13 at 11:35
  • Don't bet on this being a client issue. In this particular case, it almost certainly isn't. – Michael Hampton Oct 28 '13 at 19:23
  • @Michael: what evidence do you have for that? I certainly don't have that issue locally, not with Chrome, Firefox or Safari. I do sometimes see it when travelling and using a mobile network, when the network cuts out from time to time. – Martijn Pieters Oct 28 '13 at 19:34
  • Stack Exchange made some, uh, changes to WebSockets on this day; they are now using wss:// on port 443 and a different host. And, no, it doesn't seem to be reliable at all. – Michael Hampton Oct 28 '13 at 19:37
  • @MichaelHampton: I had the impression SSL websockets had been experimented with before and we already switched to them from time to time. I certainly did not hear anything from the developers on the day this question was being asked. – Martijn Pieters Oct 28 '13 at 19:38
  • @MichaelHampton: I see that websocketstest.com does include SSL testing, which the OP didn't report were failing for him; I didn't see anything that day but perhaps the OP does have problems with SSL connections that don't show with regular connections. – Martijn Pieters Oct 28 '13 at 19:43
  • Then I also have problems with SSL connections that don't show with regular connections (and hint: I don't) since I have also been seeing this issue since the changeover on Saturday. Though it's been fine for the last hour or so... – Michael Hampton Oct 28 '13 at 19:44
  • I'll keep an eye out then; I have not seen any issues, but then again I don't always have the tab open for hours at a time. Tomorrow I'll have an opportunity to observe. – Martijn Pieters Oct 28 '13 at 20:16
  • 1
    After a session in Wireshark, I can confirm that it is Stack Exchange closing the connection. Why this is happening, though, is the mystery. – Michael Hampton Oct 28 '13 at 20:57
  • @MichaelHampton: interesting. My socket is still open. It could be that they are running into limits on the number of active sockets. – Martijn Pieters Oct 28 '13 at 21:00
  • @MichaelHampton: I just saw a reconnect of the socket. It reconnected at the whole hour. – Martijn Pieters Oct 28 '13 at 21:02
  • @MichaelHampton: I continue to see regular reconnections; between 6 and 15 minutes apart. – Martijn Pieters Oct 28 '13 at 21:33
  • I have one in Wireshark that lasted all of 18 seconds. It's pretty obviously not a NAT connection tracking issue. And with SE sending the initial FIN packet to close the connection, it's either really them, or the NSA... – Michael Hampton Oct 28 '13 at 21:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .