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

Intermittent network errors on Chrome when running WebDash on 3rd party hosting websites #17

Open
ibdafna opened this issue May 20, 2021 · 4 comments

Comments

@ibdafna
Copy link
Owner

ibdafna commented May 20, 2021

Chrome seems to trigger NetworkError exceptions when loading Pyodide from free 3rd party hosting solutions such as Vercel and Netlify. This issue does not occur when served from a local HTTP server or when using Firefox (locally or on the free hosting services). This leads me to think Chrome has some sort of concurrent loading network mechanism which potentially hammers the free hosting services, who in turn ignore or drop the request, resulting in no response.

It's still a very shaky hypothesis at this stage, but this issue definitely needs investigating.

@ivanov
Copy link
Collaborator

ivanov commented May 20, 2021

for me, it's reliably the three largest packages that fail - numpy, pandas, and plotly.

pyodide.js:198 Couldn't load package from URL https://webdash.netlify.app:/python-dateutil.js
webdash.ts:216 Uncaught (in promise) ErrorEvent {isTrusted: true, message: "Uncaught Error: NetworkError for: https://webdash.netlify.app:/numpy.data", filename: "https://webdash.netlify.app/numpy.js", lineno: 1, colno: 2152, …}
numpy.js:1 Uncaught Error: NetworkError for: https://webdash.netlify.app:/numpy.data
pandas.js:1 Uncaught Error: NetworkError for: https://webdash.netlify.app:/pandas.data
plotly.js:1 Uncaught Error: NetworkError for: https://webdash.netlify.app:/plotly.data
    at XMLHttpRequest.xhr.onerror (plotly.js:1)

@ibdafna
Copy link
Owner Author

ibdafna commented Jul 29, 2021

Vercel have finally gotten back to me - there is some black magic sorcery in their edge network which identifies the excessive requests as a DDoS attack. There is no good way around that problem without a paid CDN. Potentially Fastly or equivalent. I am wondering is Service Workers can somehow pace the downloads and cache - might slower on the first run but fast afterwards.

@ibdafna
Copy link
Owner Author

ibdafna commented Aug 25, 2021

I investigated this further, and the issue stems from throttling free providers such as Vercel and Netlify apply to free account tiers. The solution would be to serve WebDash from a CDN which is designed for that kind of traffic.

@ibdafna
Copy link
Owner Author

ibdafna commented Oct 16, 2021

Issue seems to be resolved with #18. @ivanov are you able to confirm if the numpy/pandas issues are gone? 😄

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

No branches or pull requests

2 participants