Apex Language Server hangs on large(>3000 lines) Apex classes.
See original GitHub issueSummary
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
- Open large *.cls
- 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:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
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?
Что такое, дорогие мои индусы? Это вам не девочек топить и не лойсы на стековерфлоу клянчить?