Skip to content

High CPU and RAM usage while offlineΒ #566

@codingjerk

Description

@codingjerk

On Linux, if I'm offline, name resolution results in temporary failure.

Cause of this, copilot lsp retry requests without backing off in some kind of loop, resulting in high CPU usage (100% of single core) and ram (growth is ~5MiB per second).

I'm getting tons of following lines in lsp.log (replaced \n with actual newlines to make it readable):

[ERROR][2025-09-12 03:42:53] ...lsp/handlers.lua:562	"[lsp] Request checkStatus: FetchError: getaddrinfo EAI_AGAIN api.github.com
    at fetch (~/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at cachingFetch (~/.local/share/nvim/lazy/copilot.lua/copilot/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at PM.fetch (~/.local/share/nvim/lazy/copilot.lua/copilot/lib/src/network/helix.ts:78:22)
    at apiFetch (~/.local/share/nvim/lazy/copilot.lua/copilot/lib/src/network/github.ts:32:22)
    at fetchCopilotToken (~/.local/share/nvim/lazy/copilot.lua/copilot/lib/src/auth/copilotToken.ts:235:16)
    at authFromGitHubSession (~/.local/share/nvim/lazy/copilot.lua/copilot/lib/src/auth/copilotToken.ts:153:22)
    at oH.fetchCopilotToken (~/.local/share/nvim/lazy/copilot.lua/copilot/lib/src/auth/copilotTokenManager.ts:59:29)
    at ~/.local/share/nvim/lazy/copilot.lua/copilot/lib/src/auth/copilotTokenManager.ts:89:24 {
        type: 'system',
        _name: 'FetchError',
        code: 'EAI_AGAIN',
        errno: -3001,
        erroredSysCall: 'getaddrinfo'
    }"

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions