Issue
Getting following exception in my Eclipse '.metadata.log' file that is resulting into almost 80% of CPU usage. Anybody knows what this means? Or how it needs to be fixed? This started after STS plugin was installed on Eclipse.
`
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: The pipe is being closed
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
at org.eclipse.lsp4e.LanguageServerWrapper.lambda$13(LanguageServerWrapper.java:497)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: The pipe is being closed
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:72)
at org.eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:265)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.request(RemoteEndpoint.java:161)
at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:91)
at jdk.proxy11/jdk.proxy11.$Proxy35.shutdown(Unknown Source)
at org.eclipse.lsp4e.LanguageServerWrapper.lambda$13(LanguageServerWrapper.java:495)
... 7 more
`
This absolutely is killing my productivity, and I have a very good config machine here, Lenovo t495 with full SSD storage and 32 GB RAM. Just does not make sense. Checked the '.metadata.log' file and just keep seeing this exception.
Solution
I think I found the answer. I'm new to Spring, but this is how I resolved it.
Select Spring boot in the setting below.
Also FYI, when I enabled logs in the setting below, I discovered that each of my project source file is being submitted as text to some process, and this is done for each and every file. So, there is entire project text that is being submitted (or something), and 'post' fails, and the plugin proceeds to next file, and these failues happen for each source file. I dont know if the plugin is trying to submit in an 'infinite loop' or something, but that seems to be the case why the CPU usage is spiking and rendering the machine useless.
Enabling 'Spring language server' actually fixed this. I see that there are very momentary spikes of CPU to like 7-10% and nothing more than that after this change.
And then I discover this that, Language server consoles are being created momentarily and then terminated, which explains those little spikes of 7-10% of CPU usage. I really was suffering from this for a month (might sound dumb :|) where my actual tasks were getting delayed, and then this finally fixed it.
I felt that this could have been much more sanely dealt with, not sure if I'm not educated enough to use this plugin given I'm novice in Spring here.
Hope this helps someone!
EDIT: I think the best way is to just turn this off. After this change, Eclipse still works the same for me, functionally. Hope this plugin works good, and someday will see its benefits.
Answered By - Siva
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.