Skip to content

fix: increase LSP initialize timeout for JDTLS and KotlinLS#25648

Closed
norbu35 wants to merge 1 commit into
anomalyco:devfrom
norbu35:fix/lsp-jdtls-initialize-timeout
Closed

fix: increase LSP initialize timeout for JDTLS and KotlinLS#25648
norbu35 wants to merge 1 commit into
anomalyco:devfrom
norbu35:fix/lsp-jdtls-initialize-timeout

Conversation

@norbu35
Copy link
Copy Markdown

@norbu35 norbu35 commented May 3, 2026

Problem

JDTLS and KotlinLS are JVM-based language servers that perform Gradle sync and workspace indexing during the LSP initialize handshake. For real projects this takes 60–180 seconds, well above the default 45 s timeout — causing lsp_diagnostics to fail with LSP request timeout (method: initialize).

See #23982 for full diagnosis and logs.

Changes

  • Add optional initializeTimeout field to LSPServer.Handle so built-in servers can declare their timeout needs
  • Use it in client.ts with the existing INITIALIZE_TIMEOUT_MS (45 s) as the default — no behavior change for any other server
  • Set initializeTimeout: 180_000 for JDTLS and KotlinLS

Testing

31 pass, 0 fail across test/lsp/*
 9 pass, 0 fail for test/config/lsp.test.ts
Typecheck passes (bun typecheck)

Closes #23982

JDTLS (Eclipse JDT Language Server) and KotlinLS are JVM-based
language servers that must perform Gradle project sync and workspace
indexing during LSP initialize. For real-world projects this routinely
takes 60-180 seconds, well above the default 45 s timeout.

Add an optional initializeTimeout field to the LSP server Handle
interface so built-in servers can declare their timeout needs. Use it
in the client with the existing 45 s constant as the default.

Set 180 s for JDTLS and KotlinLS, both of which run on the JVM and
trigger Gradle sync during initialization.

Closes anomalyco#23982
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@norbu35
Copy link
Copy Markdown
Author

norbu35 commented May 3, 2026

Closing in favor of reopened #23988 with updated description.

@norbu35 norbu35 closed this May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LSP initialize timeout too short for Java/Gradle projects (~15s vs ~114s needed)

1 participant