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

Browser freezes on Theia IDE opening #14039

Closed
mmorhun opened this issue Jul 26, 2019 · 15 comments
Closed

Browser freezes on Theia IDE opening #14039

mmorhun opened this issue Jul 26, 2019 · 15 comments
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Milestone

Comments

@mmorhun
Copy link
Contributor

mmorhun commented Jul 26, 2019

Describe the bug

Whole browser tab is freezed for 30-45 seconds on Theia IDE opening.
Even refresh tab button doesn't work.

Che version

Che master nightly
Che Theia: 7.0.0-rc4

Steps to reproduce

  1. Open dashboard
  2. Start a workspace from left bar (just created one or already existed - doesn't matter)
  3. Wait IDE to be opened. The whole browser tab is freezed for about 30-45 seconds!

Another way:

  1. From a running workspace with Theia IDE open dashboard (in the same tab)
  2. Switch to IDE again (by clicking Open button from workspace details or from left sidebar
  3. Whole tab is freezed for a half of a minute!

Expected behavior

Theia IDE opens in a moment

Runtime

Tested on Minishift minishift v1.34.1+c2ff9cb and Minikube 1.2.0

Screenshots

hunged-request-with

hunged-request-with-dev-tools

Installation method

chectl

Environment

Fedora 30, Virtualbox 6.0.8

Additional context

While page is freezed it says Waiting for static.developers.redhat.com

@mmorhun mmorhun added kind/bug Outline of a bug - must adhere to the bug report template. area/editor/theia Issues related to the che-theia IDE of Che status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jul 26, 2019
@olexii4
Copy link
Contributor

olexii4 commented Jul 26, 2019

It is a very annoying bug

@rhopp rhopp added the severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. label Jul 26, 2019
@rhopp rhopp added this to the 7.0.0 milestone Jul 26, 2019
@rhopp rhopp removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jul 26, 2019
@rhopp
Copy link
Contributor

rhopp commented Jul 26, 2019

I don't have such big freezes, I also see some error about static.developers.redhat.com in browser console (and maybe few seconds delay) and we have two duplicates reported today.
I think this is something we should fix in 7.0.

@olexii4 olexii4 added the status/in-progress This issue has been taken by an engineer and is under active development. label Jul 29, 2019
@olexii4
Copy link
Contributor

olexii4 commented Jul 29, 2019

This problem comes with the synchronous request
https://github.com/eclipse/che-theia/blob/master/generator/src/cdn/base.ts#L105
end the error "504 Gateway Timeout". The browser was frozen near 30second

It was reproduced yesterday. It isn't reproducible now. And we have another error "404 Not Found". The browser spends 1ms only.

The logical demand to have the cdn request in ahead. That is why it was done as a synchronous one.

Yes, we can predict this problem on client-side with asynchronous request and timeout, but this solution adds a timeout to regular loading.

The problem with an error 504(Gateway Timeout) is unusual and it is gone. And it is necessary to understand should we live it as is or not.

@l0rd @davidfestal @evidolob WDYT?

@l0rd
Copy link
Contributor

l0rd commented Jul 29, 2019

@olexii4 thanks for this analysis. I am removing the blocker label and setting P1 because it looks like an exceptional case.

@davidfestal and @benoitf you have designed/implemented that: how do you think client-side should behave in these 504/404 scenarios?

@l0rd l0rd added severity/P1 Has a major impact to usage or development of the system. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach and removed severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. status/in-progress This issue has been taken by an engineer and is under active development. labels Jul 29, 2019
@benoitf
Copy link
Contributor

benoitf commented Jul 30, 2019

I think it would be better to use async request.
The goal is to receive the CDN content as soon as possible but if it's not there, it shouldn't block the flow.

about 504/404 errors well then CDN is not there and it should continue with the other content

BTW @davidfestal CDN is still Akamai's based ? as it's quite unusual to have Akamai's down

@davidfestal
Copy link
Contributor

you have designed/implemented that: how do you think client-side should behave in these 504/404 scenarios?

@l0rd on 404 errors, the use-case is OK: the HEAD / GET requests would return immediately, and the files are loaded from their original location (workspace theia nodejs-based web server).
In fact this is the case for all types of HTTP errors, but the problem with 504 is that the error is triggered after a quite long timeout (gateway timeout). So since the requests are synchronous, the browser is freezed.

I think it would be better to use async request.

The place where the calls are done made it uneasy to send aync requests in those 2 cases (but you might surely provide a better solution). However let me mention that in the 2 sync requests, we're not fetching the content of the main, possibly big, application files. One case is simply a HEAD request (=> without content) to the URL of the real files to download, and the only other case is to fetch the vscode monaco loader javascript file which is rather small.

BTW @davidfestal CDN is still Akamai's based ? as it's quite unusual to have Akamai's down

I've looked into this already, and it seems that the folder containing the CDN files has many olf artifacts that we can remove. I'll do the required cleaning, and will contact the manager of our Akamai account to check if everything is back to normal.

@davidfestal
Copy link
Contributor

I've looked deeper into why che-theia artifacts are not available in the Akamai CDN folder (404 error), and it seems they are simply not pushed anymore during Jenkins builds since a while.

2 main points should be checked:

I will try to gather the artifacts contained in the last release 7.0.0-rc-4.0 docker image, and will push them manually.
However it would be important to fix this for nightlies, the next RC, and mostly for the GA.

@evidolob any idea ?

@davidfestal
Copy link
Contributor

As for adding more robustness in case of 504 timeouts or non-responding URLs, to avoid blocking the browser in these exceptional cases, we've been discussing with @benoitf about possible, quite simple, solutions we could explore.

However I'm not sure we would have time to include this for GA.
@l0rd @slemeur Do you think this should be a high-priority task that could be taken, for example, by the IDE 2 team ?

evidolob added a commit to eclipse-che/che-theia that referenced this issue Jul 30, 2019
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
evidolob added a commit to eclipse-che/che-theia that referenced this issue Jul 30, 2019
* eclipse-che/che#14039 push to CDN on each build
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Co-Authored-By: Florent BENOIT <fbenoit@redhat.com>
@l0rd
Copy link
Contributor

l0rd commented Jul 30, 2019

@davidfestal that's not a blocker. We can eventually include it in 7.0.0 if we are 100% confident that we are not going to introduce a new regression and we don't have other tasks with higher priority to work on. Otherwise let's just prioritize it for next sprints.

@slemeur
Copy link
Contributor

slemeur commented Jul 30, 2019 via email

evidolob added a commit to eclipse-che/che-theia that referenced this issue Jul 30, 2019
* eclipse-che/che#14039 push to CDN on each build
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Co-Authored-By: Florent BENOIT <fbenoit@redhat.com>
evidolob added a commit to eclipse-che/che-theia that referenced this issue Jul 30, 2019
* eclipse-che/che#14039 push to CDN on each build
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Co-Authored-By: Florent BENOIT <fbenoit@redhat.com>
@davidfestal
Copy link
Contributor

@l0rd @slemeur Could we change the milestone accordingly if it's not for 7.0.0 anymore ?

@slemeur slemeur added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. and removed status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach labels Aug 6, 2019
@akurinnoy akurinnoy self-assigned this Aug 13, 2019
@akurinnoy
Copy link
Contributor

@l0rd @slemeur don't you mind to change the milestone to other then 7.0.0 because it's too dangerous to merge something related to this issue before GA.

@gorkem
Copy link
Contributor

gorkem commented Aug 13, 2019

Does this need a known issue on the docs?

@slemeur slemeur modified the milestones: 7.0.0, 7.1.0 Aug 13, 2019
@slemeur
Copy link
Contributor

slemeur commented Aug 13, 2019

agreed, documenting it would be nice as well. cc @rkratky

@sunix sunix added team/ide2 status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach and removed status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Sep 11, 2019
@sunix
Copy link
Contributor

sunix commented Sep 18, 2019

looks like this issue is not reproducible anymore. Closing it. Feel free to reopen if someone still has this problem.

@sunix sunix closed this as completed Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Projects
None yet
Development

No branches or pull requests

10 participants