-
Notifications
You must be signed in to change notification settings - Fork 912
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
[BUG] @osd/optimizer runs for very long time with no output #3181
Comments
See also #2331 |
Having done a little deep dive here, here's my findings. The error seen here is the result of 3 async processes resulting in the beautiful error that you see.
If you know what to look for its quite easy to tell when this is happening. e.g. for a fresh install when nothing is cached:
If we access the page after this, we dont see the above error. This will not happen if any of the above conditions arent true. e.g. If the bundles are already cached or if the user only attempts to access the page after about 2 minutes, etc. @pjfitzgibbons, the expected behavior you are asking for does occur. If the optimiser is still working on bundling you should see the log output I dont have a perfect solution at hand for this, but here are a few ideas I had:
I'm also not a fan of how we surface the big red banner but if we implement any of the above solutions, it will atleast be accurate since the server will have more information. |
@ashwin-pc is it possible to expose optimizer status somewhere, maybe through API, or existence of some file, or a recommended I find it easy to miss |
@joshuali925 I've outlined some suggestions on how we can expose this status. The ones that im leaning towards the most is exposing it via the html when you load the Dashboards page. Another thing thats available to you today is actually just looking out for the The reason i suggest this over a more complex solution is because there are plans to get rid of the optimizer code as a whole, so im not sure how much time we want to invest in a problem that has at least a partial solution for now. |
@ashwin-pc Thanks for looking into this
That would be great and I agree it's not worth it to improve messaging on optimizer. For now I've been grepping logs to find the latest successful compile time. I'll know it's stuck at compiling if the time does not change after saving source code. $ awk '/bundles compiled successfully after/{t=$4} END{print t}' dashboards.log # [20:58:52.777] |
@joshuali925 is the optimizer taking 2 mins even after the first startup? the contents should be cached after the initial run and only rebuild the plugins that change. Are you working on a core plugin like the data plugin or something that needs you to actively monitor the optimizer? |
@ashwin-pc I don't know what triggers the The |
Describe the bug
@osd/optimizer package is set to run by default on
yarn start
. This feature runs async code-compilation work at runtime on the server. This package runs for a very long time (MINUTES), meanwhile, the application is "broken" on the browser.Symptoms may include :
"OpenSearch Dashboards did not load properly"
Application error on browser with stack trace and advised workaround "Clear your session".
To Reproduce
Steps to reproduce the behavior:
This issue has intermittent behaviour. Most commonly, this occurrs after switching branches on local dev environment, especially between maj/min versions (
main
=>2.x
for instance).yarn start
http server running at http://localhost:5603/xyz
Expected behavior
Some log output of some kind indicating that Optimizer is actively working on processes. The async and file-watch behaviour may preclude Optimizer from declaring "finished" - observation of the log should indicate when Optimizer activity has relatively ended over time.
OpenSearch Version
3.0, 2.x
Dashboards Version
3.0, 2.x - "main" branch
Plugins
All default plugins.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: