question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Retry loading a file

See original GitHub issue

I’ve been logging error callbacks from loadjs for the past 5 weeks. My observations are:

  • Mobile devices make up about 80% of the errors, although only around 50% of the users
    • Makes sense as mobile more likely to be lossy
  • For each user impacted, there’s an average of 2 errors each
    • This despite each page loading an average of about 8 files through loadjs, i.e. it’s not even close to 100% of files being impacted at once - the rest presumably got through

This leads me to believe that in some of these cases, retrying failed file loads might actually work. Although I could probably write a wrapper around this, would you support the concept of retries in the library itself?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
amoreycommented, Dec 10, 2016

@rarkins I added a numRetries option to loadjs in v3.1.0:

loadjs(['/path/to/foo.js', '/path/to/bar.js'], 'foobar', {
  success: function() { /* foo.js & bar.js loaded */ },
  error: function(pathsNotFound) { /* at least one path didn't load */ },
  numRetries: 2
});

Let me know if you run into any issues using the feature.

0reactions
amoreycommented, Dec 11, 2016

Great! Thanks for checking the code with the browser plugin. Let me know if the new code decreases the number of network errors you’re seeing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python retry to open the file - Stack Overflow
What is the best practice to try to open the file and retry after n seconds? Currently, I do: import os from os...
Read more >
Retry data load via ProcessingHub Manager
Structure​ Open dataload details and retry functionality by clicking on the dataload badge. Dataload status. See section on dataload status for details.
Read more >
Automatic retry on files with upload errors - Box Pulse
In my scenario we generate a nightly build, zip it up and copy it to the Box Sync folder. The problem for me...
Read more >
'Load Interface File for Import' job stays in'Retrying' status ...
'Load Interface File for Import' job stays in'Retrying' status when invoking the Journal import via the LoadAndImportData Operation (Doc ID ...
Read more >
Retry failed uploads - Dropbox Community
Hello, While uploading several files to my Dropbox folder, my Internet connection dropped. I had to reconnect and as a consequence several uploads...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found