-
Notifications
You must be signed in to change notification settings - Fork 206
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
OpenRewrite unchecked, but always Language Server Background Job(Loading Rewrite Recipes) #925
Comments
Thanks @w6et for reporting this, the language server is probably loading the OpenRewrite recipes nevertheless the preference is disabled - and therefore doesn't need to do that. We should change that. But the activity should really happen just once and not multiple times. Do you see this progress view entry multiple times? And do they run for a very long time (or even all the time)? Or do they disappear from the progress view again? |
@martinlippert yes,happen multiple times, and highly increased memory consumption together. |
Same here, Eclipse is unusable due to this. Constantly freezes due to dozens of (hanging) background jobs and has to be force-killed. |
@w6et @gbaso I'd like to check if there are more than one language server started in these case or is it just the progress that is never terminated.
Also, I'm curious whether you are seeing multiple Loading Rewrite Recipes jobs at startup of STS or eventually after working in STS for some time. Do you recall performing changes to maven pom or gradle build files right before seeing those rogue jobs? |
@w6et @gbaso Can you also enable the preference to push the logs from the Spring Boot language server via: In addition to that it would also be interesting to see if the problem completely goes away if you disable the Spring Boot language server altogether from the |
@BoykoAlex disabling Start Language Server at startup solved the problem for now. I'll try to dig in the logs and in jps later today. |
@martinlippert Enabling the logs immediately found an issue: startup takes almost 5 minutes, resulting in 1389 occurrences of "Validating Spring Boot version on project" between 29 maven modules. Fair to say this is not expected behaviour. I'm currently on spring boot 2.6.5. |
@gbaso We are working on reducing the number of project reconcile requests as they are too frequent. Some initial work for this but it might help already should be available tomorrow via the nightly build update site: https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.26 Note that unterminated jobs in the progress view originally reported in this issue by @w6et is the result of Boot LS started and shutdown in quick successions on startup. It is a different issue and we are investigating it. |
Thanks @BoykoAlex. I also had the problem of multiple LS Loading rewrite recipes. According to
They start appearing shortly after startup, but they don't seem to be triggered by the startup itself.
I'm doing maven module refactoring, which includes modifying poms, opening/closing projects and issuing maven updates. |
me too!only one “BootLanguageServerBootApp”(pid changed,old terminated,new created) when i‘m seeing multiple Loading Rewrite Recipes jobs
after working in STS for some time.I started muitiple sts. I'm doing JavaFileName of 'Package Explorer view' to click
I'm not sure , The issue isn't reproduced yet.:sweat_smile: |
Unsure if I had this specific issue but I had an excessive amount of loading bars from language server background jobs showing in my progress tab and unchecking "Preferences > Language Servers > Spring Langauge Servers > Spring Boot Langauge Server > start language server at start up" like mentioned above solved my issue. |
Here is a summary of things that you can do to workaround the performance issues in the 4.17.0 release: |
That solved my problem too after updating my STS to the latest Spring Boot Version and Java to SE-17 I was having that issue. Now the Eureka Server registers all my microservices. |
yep that fixed the problem! |
We will ship a fix for this issue with the upcoming 4.17.1 release. |
OK, here are the logs @martinlippert . The language servers went crazy again :( We jinxed it by closing this ticket... |
@youcangetme are there files such as |
Yep, I do distinctly recall starting a new instance by accident. It is rare for me to do that which is why I remember it. |
I did not do a double start today but on the second start to fix a problem with a mouse the language servers entered a runaway state again. |
Unfortunately eclipse logs don't seem to have enough information to determine what is causing the problem. I have added logging statements in the upstream LSP4E project: Download the attached
Now restart the IDE, reproduce the issue and please send us the eclipse logs once the issue is reproduced. It is important to capture the initialization of STS/Eclipse in the logs hence I'd delete all .log and .bak_x.log files in order not to have old logs before you start reproducing the issue. I have another idea of what that might be but lets first see the logs We are trying to fix it for the 4.18.1 release... but if it takes longer that by the end of the week think we'd release and continue our efforts to fix this post 4.18.1. Thanks very much for helping us to get to the bottom of this pesky issue! |
Ok, I cleared the logs and installed the feature. I will drop a log zip when I get the problem again. |
I did not double start my instance this time. |
I have added more logging and a possible fix: Please update again and give it another try :-) |
I deleted the logs and installed the new patch. i will post the logs when it blows up again. |
@youcangetme missed one place in the code with a possible fix. Here is the updated zip: Sorry about the late notice :-\ |
Well, this is with the new snapshot so hopefully you have usable logs. |
Looks to me like the issue has two parts to it. Part One.
There is no matching log entries on the LS side (no entries at 22:39:47 and 22:39:48):
Therefore timeouts for this:
as nothing has been received from the language server at all, however, the process seem to have started... Part Two I'd try to limit Boot LS t only one process/LS wrapper properly by setting Also logging adjusted for lsp4e: |
@youcangetme should be ok to install snapshot of sts4 for eclipse from an nightly/snapshot update site found on this page: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html |
Ok, logs reset and everything installed and updated. |
@youcangetme how's it going with the new sts4 snapshot and a modified lsp4e? Have you been busy and not had time to watch this stuff or is it just working now? :-) |
I've been running 4.18.1 release for over a week now and no issues. Good job!
…________________________________
From: Alex Boyko ***@***.***>
Sent: Friday, May 12, 2023 10:35 AM
To: spring-projects/sts4 ***@***.***>
Cc: Mark Stevens ***@***.***>; Comment ***@***.***>
Subject: Re: [spring-projects/sts4] OpenRewrite unchecked, but always Language Server Background Job(Loading Rewrite Recipes) (Issue #925)
@youcangetme<https://github.com/youcangetme> how's it going with the new sts4 snapshot and a modified lsp4e? Have you been busy and not had time to watch this stuff or is it just working now? :-)
—
Reply to this email directly, view it on GitHub<#925 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APLVTXM5IKFLDGJT4LNS7FLXFZDCBANCNFSM6AAAAAAS56MAO4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hmmmm, I have not seen the language server go nuts on any machine with the new patches installed. I am wary to pronounce it "fixed." But I am willing to say (while knocking on wood) "sure, give it prime time exposure and see." |
I still haven't seen anything bad yet and I have been banging on it pretty darn hard. |
@youcangetme could you please attach your logs (eclipse and boot ls) from these few past days? Are STS tools working though? Do you see content assists in boot properties files, spring symbols showing up after Ctrl-6, etc? I think the singleton property for the LS extension point is the real fix to the problem... Stuff that went into LSP4E is mostly for logging... Thus if at some point you switch to just the snapshot distro of STS4 it should work just as well ideally. |
Sorry I missed your message. I will upload the logs in the morning. |
This one seems awfully small. Sorry for the delay. |
@youcangetme I have gone through the logs and it seems fixed to me - only one Boot LS at all times. Seems reasonable to mark this as fixed. The actual fix is in STS4: b19c16c |
Thank you both @BoykoAlex and @youcangetme for your work on this, your patience, and your relentless drive to solve this. Very very much appreciated. |
@martinlippert glad to help. Everything continues to work as expected so I am changing back to the regular distro to keep in sync with my developers. |
Describe the bug
Version: 4.17.0.RELEASE
when i click "package Explorer" from "java Source Window"
The text was updated successfully, but these errors were encountered: