question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apex Language Server hangs on large(>3000 lines) Apex classes.

See original GitHub issue

Summary

While working on large Apex *.cls files, with number of lines > 3000 Apex Language Server stops working. No more code completion, as a result. Restarting of VS Code is necessary in order to get language server back to job.

Steps To Reproduce:

Machine used: Ryzen 5 1600, 8GB DDR4, Gigabyte SSD 240GB, Windows 10 Pro. VS Code 1.43.2

  1. Open large *.cls
  2. PROFIT!

This doesn’t happens on Ubutnu 18.04, running on i3 with 16GB of DDR4.

Throws following logs: `��� 15, 2020 3:11:52 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2441 ��� 15, 2020 3:11:58 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2449 ��� 15, 2020 3:11:58 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2450 ��� 15, 2020 3:11:59 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2452 ��� 15, 2020 3:12:00 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2455 ��� 15, 2020 3:12:00 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2458 ��� 15, 2020 3:12:00 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2457 ��� 15, 2020 3:12:01 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2460 ��� 15, 2020 3:12:01 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2464 ��� 15, 2020 3:12:02 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2466 ��� 15, 2020 3:13:04 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2492 ��� 15, 2020 3:13:09 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2496 ��� 15, 2020 3:13:11 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2497 ��� 15, 2020 3:13:12 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2501 ��� 15, 2020 3:13:15 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2507 ��� 15, 2020 3:13:17 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2502 ��� 15, 2020 3:13:20 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2518 ��� 15, 2020 3:13:23 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2515 ��� 15, 2020 3:13:31 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2523 ��� 15, 2020 3:13:31 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2519 ��� 15, 2020 3:13:37 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2524 ��� 15, 2020 3:13:37 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2525 ��� 15, 2020 3:13:57 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError SEVERE: Internal error: java.lang.OutOfMemoryError: Java heap space java.util.concurrent.CompletionException: java.lang.OutOfMemoryError: Java heap space at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source) at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) at java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown Source) at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Caused by: java.lang.OutOfMemoryError: Java heap space

[Error - 15:13:57] Request textDocument/documentSymbol failed. Message: Internal error. Code: -32603 java.util.concurrent.CompletionException: java.lang.OutOfMemoryError: Java heap space at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source) at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) at java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown Source) at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Caused by: java.lang.OutOfMemoryError: Java heap space

��� 15, 2020 3:14:56 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2532 ��� 15, 2020 3:14:58 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2538 ��� 15, 2020 3:15:03 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2546 ��� 15, 2020 3:15:03 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2534 ��� 15, 2020 3:15:07 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2548 ��� 15, 2020 3:15:24 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2558 ��� 15, 2020 3:15:37 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 2550 ` Java heap space left by default.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
uBiWcacommented, Apr 28, 2020

Ok, so i moved to Java 11, and set maximum java memory size to 4096 mb. Now Apex Language server works with this settings, but… When i was young, i was coding under ms-dos on a machine with 1 mb ram(yeah, ONE MEGABYTE of RAM). And what do you think? It was very satisfying experience. ONE MEGABYTE of RAM. And now i need 4096mb to force IDE to work, while this IDE has almost the same functionality as Borland Pascal 7.0 had on 386 running 25 mhz with 1 MB of RAM. Maybe you need to do some optimizations, dont you think so?

1reaction
uBiWcacommented, Apr 21, 2020

Что такое, дорогие мои индусы? Это вам не девочек топить и не лойсы на стековерфлоу клянчить?

Read more comments on GitHub >

github_iconTop Results From Across the Web

apex language server could not provide information about ...
I am trying to debug apex in visual studeo code using Intractive Apex Debugger but when i clicking debug button i am getting...
Read more >
nIU - River Thames Conditions - Environment Agency - GOV.UK
Meriton gold coast wotif, North face apex bionic womens macys, ... Attends pull ons 5 large, Open publisher gratuit, Boilermaker training manual, ...
Read more >
Static Application Security Testing (SAST) - GitLab Docs
If you're using GitLab CI/CD, you can use Static Application Security Testing (SAST) to check your source code for known vulnerabilities.
Read more >
Known issues with PaperCut MF, NG, Hive, Pocket and ...
PaperCut Print Deploy: Defaults and Capabilities are not correctly captured on PaperCut Mobility Print queues when cloning. Server: 1.5.1805 Cloner: 493.
Read more >
How to Update millions or records in a table - Ask TOM
How I can extract about 5 million records (based on a condition) into a separate database/server from a 100million record table? What's the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found