You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stopping a language server that held 100 or more closed documents logs "Too many non-blocking read actions submitted at once" #2097
When a language server stops, LSP4IJ clears the Project view problems of the closed documents it held, and submits a non-blocking read action for each of their files at once. With 100 or more files, IntelliJ logs an error:
java.lang.Throwable: Too many non-blocking read actions submitted at once. Please use coalesceBy, BoundedTaskExecutor or another way of limiting the number of concurrently running threads.: 99 with similar stack traces are currently active
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:378)
at com.intellij.openapi.application.impl.SubmissionTracker.preventTooManySubmissions(SubmissionTracker.java:47)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.<init>(NonBlockingReadActionImpl.java:363)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.submit(NonBlockingReadActionImpl.java:306)
at com.redhat.devtools.lsp4ij.features.diagnostics.LSPDiagnosticUtils.reportProblem(LSPDiagnosticUtils.java:80)
at com.redhat.devtools.lsp4ij.features.diagnostics.LSPDiagnosticUtils.lambda$clearProblem$1(LSPDiagnosticUtils.java:176)
...
Seen with LSP4IJ 0.30.1 in IntelliJ 2026.2.3; main (1b44654) has the same code. A language server whose diagnostics cover closed files, as one whose workspace diagnostics LSP4IJ pulls, leaves a closed document for each file it reported, so stopping or restarting it in a large project reaches 100 easily. We met it in our UI test, which stops the language server while it has work pending, after earlier steps had left many files with errors.
Cause
It comes from our #1868, which made the clear go through a report of each file.
When a language server stops, LanguageServerWrapper.stop passes all of its closed documents to LSPDiagnosticUtils.clearProblem at once.
clearProblem runs one non-blocking read action, which calls reportProblem for each file. Each call submits a non-blocking read action of its own, coalesced by its file, so none merge: a clear of n files submits n read actions together, and IntelliJ's SubmissionTracker logs an error once 100 are active.
Suggested fix
The clear has to keep what #1868 gives it: a file's reports run one after another, the last submitted last, so a clear never runs after a report of errors published since. It must do that without a read action for each file at once. A test can stop a language server that holds 150 closed documents with errors, and expect their problems cleared and no error logged.
Activity
Record UP81 in the upstream register: a stopping language server's pr…
Record UP81 in the upstream register: a stopping language server's pr…
fix: clear the problems of a stopped language server's files one afte…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record UP81 in the upstream register: a stopping language server's pr…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record UP81 in the upstream register: a stopping language server's pr…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
5 remaining items
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record UP81 in the upstream register: a stopping language server's pr…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record UP81 in the upstream register: a stopping language server's pr…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record UP81 in the upstream register: a stopping language server's pr…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…
Record LSP4IJ 0.30.1's IDE error for a stopped server's closed docume…