GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Multiple jdtls LSPs eating memory in java monorepos by stevoland · Pull Request #12123 · anomalyco/opencode

Conversation

@stevoland

@stevoland stevoland commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

In monorepos, starts jdtls at the project root* to let it discover and handle all submodules with a single process.

*Uses the project markers already used for kotlin-ls.

There's some complexity which I think is necessary to handle all cases - hopefully explained by the inline comments.

Fixes: #11368

How did you verify your code works?

Ran in gradle monorepo, reading files from multiple modules:

Before:

LSP
jdtls module-a
jdtls module-b
jdtls module-c

After:

LSP
jdtls

Made edits and got correct diagnostics in tool results.

Ran in single project repo, made edits

Thanks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ab-boxed, sverdiyev, Areiser, and ChrisJamesHassell reacted with thumbs up emoji
All reactions
  • 👍 4 reactions
@stevoland
fix: Multiple jdtls eating memory in java monorepos
d4f3db2
@github-actions github-actions Bot added the contributor label Feb 4, 2026
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tongsh6 tongsh6 mentioned this pull request Feb 11, 2026
JDTLS uses ephemeral temp directory for -data and lacks JVM heap configuration, causing repeated full index rebuilds and potential OOM #13070
Closed
This was referenced Feb 18, 2026
fix(opencode): prefer monorepo roots for jdtls #14049
Closed
fix(lsp): resolve JDTLS root to Gradle workspace root in monorepos #14192
Closed
@ChrisJamesHassell

ChrisJamesHassell commented Feb 28, 2026

Copy link
Copy Markdown

++ Can we get a stamp on this? I stopped using OpenCode entirely because of this bug.

fabians-px, PiasekDev, and thijslemmens reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stevoland

stevoland commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @ChrisJamesHassell. Hard times round here :)

fwiw we fixed with a plugin that disables jdtls and reimplements.

It's part of a larger plugin but you'll get the idea. Just for our case where there's always a build.gradle at project root: https://gist.github.com/stevoland/f0f3c5ac12755e48db8459c8ff535cdd

ChrisJamesHassell reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChrisJamesHassell ChrisJamesHassell mentioned this pull request Mar 5, 2026
JDTLS spawns separate process per subproject in Gradle monorepos #14191
Closed
@jiayaoO3O

jiayaoO3O commented Mar 8, 2026

Copy link
Copy Markdown

Is it possible to also construct a plugin for Maven multi-module projects?

biggates reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node merged commit 42b2c4f into anomalyco:dev Mar 9, 2026
6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

opencode-agent Bot pushed a commit that referenced this pull request Mar 9, 2026
@stevoland opencode
fix: Multiple jdtls LSPs eating memory in java monorepos (#12123)
8b9710e
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 20, 2026
@stevoland @demostanis
fix: Multiple jdtls LSPs eating memory in java monorepos (anomalyco#1…
1e218be
…2123)
@e6qu e6qu mentioned this pull request Mar 21, 2026
fix: Phase 3+4 — OpenTUI 0.1.88, agent ordering, upstream fix triage e6qu/frankencode#28
Merged
3 tasks done
RobertWsp pushed a commit to RobertWsp/opencode that referenced this pull request Apr 16, 2026
@stevoland @RobertWsp
fix: Multiple jdtls LSPs eating memory in java monorepos (anomalyco#1…
1eeec1f
…2123)
@coleleavitt coleleavitt mentioned this pull request Apr 21, 2026
fix/memory 20695 coleleavitt/opencode#5
Merged
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
@stevoland opencode
fix: Multiple jdtls LSPs eating memory in java monorepos (anomalyco#1…
5c31696
…2123)
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@stevoland opencode
fix: Multiple jdtls LSPs eating memory in java monorepos (anomalyco#1…
825529a
…2123)
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
@stevoland opencode
fix: Multiple jdtls LSPs eating memory in java monorepos (anomalyco#1…
f8de07e
…2123)
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@stevoland opencode
fix: Multiple jdtls LSPs eating memory in java monorepos (#12123)
63f35a5
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
@stevoland opencode
fix: Multiple jdtls LSPs eating memory in java monorepos (anomalyco#1…
d887982
…2123)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

JDTLS spawns redundant per-module processes in Java monorepos, causing OOM

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@stevoland @ChrisJamesHassell @jiayaoO3O @rekram1-node
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.