Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Update Error #74

Closed
mickyvx opened this issue Aug 20, 2014 · 12 comments
Closed

Live Update Error #74

mickyvx opened this issue Aug 20, 2014 · 12 comments

Comments

@mickyvx
Copy link

mickyvx commented Aug 20, 2014

Randomly getting a popup error in browser with the following message. Have tried different browsers and computers.

Live Update Error: Long Polling Failed
@garysharp
Copy link
Owner

We use SignalR to update attachments and job logs in every client automatically whenever anyone makes a change. This message (while not terribly friendly) occurs whenever the device loses connection to the server - as a warning that you're disconnected and wont be updated.

We should investigate making these messages more friendly - and perhaps try to recover from this state gracefully.

@mickyvx
Copy link
Author

mickyvx commented Aug 21, 2014

That makes sense :) probably a more user friendly error would be good, or even just a page refresh.

@garysharp garysharp added this to the Disco ICT v2 milestone Aug 26, 2014
garysharp added a commit that referenced this issue Aug 28, 2014
When the live connection to the server is interrupted some ui elements
are disabled. If the connection fails (due to errors or failed
reconnection) a dialog instructs the user to check their connection and
refresh the browser. Relates to Device, Job and User pages (logs and
attachments).
@garysharp
Copy link
Owner

Implemented in bbe4ccc

discodisconnected

@mickyvx
Copy link
Author

mickyvx commented Sep 15, 2014

Still getting constant disconnected images when editing job details, even when only person in the job. Using any web browser.

@garysharp
Copy link
Owner

The changes wouldn't have any effect on the availability of the application, but provides a more friendly error message when disconnection does occur.

The message appears under the following scenarios:

  • The webpage loses access to the Disco ICT server for longer than 30 seconds (the default retry time)
  • A major error (either on the browser or server) which causes the live connection to fail.

In the past (before v2) these error messages were ignored and features on the page failed silently. Attempts could be made to reconnect automatically, however the state between client and server will fall out of sync (the client may miss messages while disconnected) - so the decision was made to inform the end-user to refresh the page.

To diagnose why you are "constantly" receiving these messages:

  • On the server: you can review relevant error messages in the logging (http://disco:9292/Config/Logging).
  • On the client: enable browser debugging (F12 shortcut key opens the debugger in most browsers) and monitor the JavaScript console and network traffic.

Most common causes:

  • You leave the browser window open on a laptop/desktop which goes to sleep, and takes a period of time to reconnect to the server after waking up.
  • The Disco ICT application has very limited resources and is not able to respond to clients in a timely fashion.

@mickyvx
Copy link
Author

mickyvx commented Sep 17, 2014

Thanks Gary,

I myself don't get this message by my colleagues do. I use Firefox and they get the message in any browser they use. I will get them to try update what they can and see if any messages appear in the logging in Disco. They are getting the messages every 30 seconds or so when trying to edit or view jobs.

As for the Disco server itself, it is running 3 cores with 4 GB RAM, which isn't even using all the allocated resources. Should this be sufficient enough?

@mickyvx
Copy link
Author

mickyvx commented Sep 17, 2014

I have managed to get one of my team members to screen capture the error with the javascript debugging, please see the picture attached below.

debugging

Would running multiple tabs of Disco cause this message to appear? I have just been told that they are using multiple tabs open at the same time to work on multiple jobs. I do not do this myself, which is probably why I am not getting the errors.

As for the server itself, it is running Windows Server 2008 R2, with IIS 7. I am wondering if it could be a issue with IIS maybe?

@garysharp
Copy link
Owner

Running multiple tabs could be the cause, see this post for the browser concurrent-connection/per-server limits:
http://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser/985704#985704

These limits are in place for various (good) reasons as discussed elsewhere.

Rather than keeping lots of tabs open, can you encourage your colleagues to use Job Queues (new in v2) to keep track of their current jobs. This will also ensure their current tasks are persisted if the browser crashes, the machine reboots, etc.

@mickyvx
Copy link
Author

mickyvx commented Nov 12, 2014

Gary,

This is still an issue for us, mainly my colleagues. Debugging hasn't helped with any further information. I have just opened the Noticeboard on our TV we have to monitor jobs and every ~10 seconds it is saying it's disconnected and trying to reconnect.

Nothing is appearing in the system log which you have said to check. So I really don't know what the issue could be. It is really odd that it isn't happening for me, never has. I believe we are all using the same browser, Firefox (latest versions), even on the TV.

Do you have any possible causes for this?

EDIT: I have tried increasing server resources and it's made no difference.

@garysharp
Copy link
Owner

Michael,

As mentioned above, unless resources were greatly constrained (“very limited resources”), adding more CPU/RAM/Network capacity will have no effect.

The errors captured by your colleague indicate the server (potentially a proxy if present) is denying the requests as 401 Unauthorized. This could indicate a compatibility issue with Firefox although our test environments (which include the latest version of Firefox) work as expected.

You mention that this also occurs on the Noticeboards and displays “refresh errors.” The noticeboards operate differently that other pages; when they lose connection they wait for 10 seconds then try and refresh the whole page (see code). If you are getting errors when simply refreshing the page then this is an entirely different issue. If you are getting errors when the page refreshes, diagnose these errors first.

Previously, the following recommendations were made:

on Sep 15 2014
To diagnose why you are "constantly" receiving these messages:

  • On the server: you can review relevant error messages in the logging (http://disco:9292/Config/Logging).
  • On the client: enable browser debugging (F12 shortcut key opens the debugger in most browsers) and monitor the JavaScript console and network traffic.

Most common causes:

  • You leave the browser window open on a laptop/desktop which goes to sleep, and takes a period of time to reconnect to the server after waking up.
  • The Disco ICT application has very limited resources and is not able to respond to clients in a timely fashion.

on Oct 2 2014

  • Running multiple tabs could be the cause, see this post for the browser concurrent-connection/per-server limits.

Here are some additional things to try:

  • Try using Internet Explorer 11. This is not an instruction to change your favourite browser, just to try and narrow down the cause/incompatibility. As mentioned above, there are valid reasons for these messages to appear, but not at the consistency you’ve described - see if IE11 reduces the number of instances.
  • Remove any proxy settings from your browser. Disco (as a local service) should have a proxy exception, and if not – some proxy servers don’t like keeping long-running HTTP requests open.
  • Update the network.negotiate-auth.trusted-uris Firefox setting (in about:config) to include disco.
  • Use Fiddler to capture the traffic; if you can’t diagnose them yourself send them to us.

Please make sure you’ve considered ALL (9) of these diagnostic suggestions. If you are still experiencing issues after providing results from the each of the above suggestions we might be able to organise a TeamViewer session and do some remote diagnostics.

@mickyvx
Copy link
Author

mickyvx commented Mar 18, 2015

Gary,

Sorry for the delay. I have gone through all trouble shooting steps now and can give you the following results.

  1. On the server there is no error messages showing within the Live Logging relating to any disconnects happening.
  2. I have enabled debugging in both IE and Firefox and noticed the same as I captured for you in the posts above. 401 errors when trying to refresh/reconnect the pages.
  3. Browser has not been opened with any other tabs but disco, even closed and reopened browser/restarted computer multiple times.
  4. Disco server itself is not short on resources, probably over resourced if anything.
  5. I added disco into the Firefox setting as suggested but this did not make any difference at all.
  6. I have run Fiddler and captured the results for you in an archive to look at which I have just emailed you.

@garysharp
Copy link
Owner

This issue is stale.
One final recommendation would be to ensure WebSockets is installed in IIS, this would be the most reliable transport for SignalR to run over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants