-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Kibana Optimizing and caching bundles for 28 hours #41726
Comments
The optimization process is responsible for generating JS bundles for all of the installed plugins. Behind the scenes, it's using webpack to perform this work. 28 hours is a really long time...as the message suggests, it should only take a few minutes. How much memory (RAM) is available on your system? Are you able to increase the amount of available RAM and retry? |
Pinging @elastic/kibana-operations |
@legrego Thanks for replying. I have 32Gb in the system, I think I can spare some :) I will test and retry. |
OK assuming NODE_OPTIONS is still the proper way to increase allocated memory, this is what I did:
Yeah I just gave it 8Gb and so far I am seeing the same results. Its only been a few minutes thus far, but it feels the same. EDIT (2 hrs later) It is still optimizing. I'm thinking that its time to remove and reinstall, but want to troubleshoot if there is anything left to try. |
@mistic do you have any suggestions here? |
@legrego @hackdefendr could you try to delete the |
Yep I will try that this evening as this is in my lab at home. |
Sorry for the delay. OK deleting the optimize directory and then running the same command seems to have worked. I am back to where I was before I started messing with things. Optimization was quick and then Kibana started right up. |
I was wrong. Only this is being created in the optimize folder:
No bundles. Does the process of creating bundles depend on the file system type? Just curious, I mean it shouldn't matter that this is Debian Buster under Windows Subsystem for Linux. I mean Linux is Linux right? If I uninstall completely, including purging all configuration files, then reinstall...Kibana starts up without issue and continues to work without issue until I try to add a plugin. I've tested apps and visualizations and got the same results. I don't know, I guess I could test an actual Debian Buster install on a legit EXT4 file system and see if I can install a plugin under Kibana. |
Reproduced the same behavior in Debian 10 (Buster) on actual hardware and in VM. Note the babelcache file is currently 44 MB, which I find odd.
Oh and it seems to loop. Deleting from the optimize/bundles folder and rebuilding. I figure this is where the problem lies. The answer might be in the ,babelcache.json file. |
any one found solution for this ? Permanent one? |
I'm starting to wonder if this is a file system related bug. Running this in Windows Subsystem for Linux (WSL) is the only time I encounter issues adding plugins to kibana. When running identical versions in an actual Linux VM on an EXT4 filesystem I do not have this problem with most basic plugins. So the question I have is, does the optimization process rely in anyway on the file system type? |
@hackdefendr, I currently running Kibana in dev under WSL2 and was using WSL1 prior without any issues. @mistic do you have any thoughts on the cause for these folks or something they can test to debug? |
@tylersmalley have you attempted to install a plugin like country-flag-fieldformatters to kibana? Basically any visualization I try to install causes kibana optimization to go on forever. Only under WSL though. |
@tylersmalley in case I'm remembering correctly WSL could have some problems with some multi threading features of webpack/some webpack plugins. One plugin that was causing those problems was @hackdefendr do you think you could upgrade the |
Yes I can try that when I get home later since this is in my lab at home. Um, any tips on how to install this other than How do I install this into Kibana? |
@hackdefendr I would say you need to have the correct yarn version installed in order to match the kibana needs (I think it should be 1.10.1) and then just run |
Perfect. That I can do...I will update this thread again a bit later. |
Related #19678 |
OK I used yarn 1.19.1 and I don't think it worked. from /usr/share/kibana, I ran:
I did not run Also, I see that 7.4.0 dropped. Should I upgrade before we go any further? |
@hackdefendr I forgot we did some operations to the package.json we ship within our distributable so the above operation would not work. I think in order to test this maybe the best thing would be checkout kibana from source, change the |
I think I can do it, but it will be this weekend before I will have the time to do this. I have all of my logs backed up in json format so we can use my WSL as a test. It will be fun to. |
OK that was interesting. Compiling Kibana under WSL. Everything built successfully including v2.1.2 terser-webpack-plugin. I will install this version under /opt to keep it separate, then will compile/install a simple plugin like that country flags one I like. |
Alright Kibana snapshot running successfully and connected to my elasticsearch. I will install the plugin tomorrow, after letting this Kibana run for some time. |
Ok I woke up this morning and my Kibana SNAPSHOT was still running perfectly. So I went ahead and compiled the country flags plugin and optimization only took about 10 minutes, but did complete successfully. Kibana started right back up, and I was able to change the GEOIP Country Code 2 field to show the Country Flag. Success! |
@hackdefendr awesome news. I will proceed and put up a PR with the fix for Kibana. Thanks for the help |
Not a problem. Like I said, it was fun to do. |
Kibana version: 7.2.0
Elasticsearch version: 7.2.0
Server OS version: Debian Buster (10)
Browser version: Google Chrome Version 75.0.3770.142
Original install method (e.g. download page, yum, from source, etc.): APT
Describe the bug:
Kibana optimization is taking a long time to complete. I decided to start it from the command line with the --optimize flag to see what happens. Nothing happens, seriously for more than 24hrs. This all started when I tried to install the Sentinl plugin, which is now removed because of obvious reasons. Now Kibana is optimizing the core plugins for the past 28 hrs.
STDOUT LOG
Steps to reproduce:
Expected behavior:
If optimization is needed, I highly doubt every plugin requires it. I suppose that I expect that optimization would not take 28+ hours to complete.
Any additional context:
I'd like to see more documentation around this mysterious and seemingly required optimization function. I like to know what is going on during this optimization process.
The text was updated successfully, but these errors were encountered: