-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Summary
The Windsurf language server fails to start, reporting a "too many open files" error, despite the system being configured with a high file descriptor limit.
Environment
- OS: Ubuntu 25.04
- Windsurf Version: 1.7.3
- System File Descriptor Limit: 65536
- Launch Method: GUI (via desktop environment)
Issue Details
Upon launching Windsurf, the language server attempts to start but exits immediately with the following error:
Language server failed - too many open files
Error types: (1) *withstack.withStack (2) *withstack.withStack (3) syscall.Errno
This occurs even though the process has the correct limit, as confirmed by:
cat /proc/<PID>/limits | grep "open files"
Max open files 65536 65536 files
Steps to Reproduce
- Set the system's open file limit to 65536 via
ulimit -n 65536
and systemd limits. - Launch Windsurf via the KDE menu or GUI session.
- Observe the crash on language server initialization.
Expected Behavior
The language server should start normally without exceeding system resource limits.
Actual Behavior
The language server crashes immediately, citing "too many open files" even though the process has the correct file limit.
Additional Information
- The issue occurs across multiple projects, even small repositories.
- No unusual symlink loops or excessive open files were detected at runtime.
- Problem appears isolated to language server startup logic.
Excerpt from Diagnostic Logs
2025-05-03 17:04:21.356 [info] Starting language server process with pid 13137
2025-05-03 17:04:21.357 [info] Language server failed - too many open files
2025-05-03 17:04:21.357 [info] Error types: (1) *withstack.withStack (2) *withstack.withStack (3) syscall.Errno
2025-05-03 17:04:21.365 [ERROR]: Language server exited with code 1
2025-05-03 17:04:21.368 [ERROR]: Failed to start language server: Error: Language server exited before sending start data
Recommendation
Please investigate whether the language server is:
- Spawning too many file watchers prematurely
- Leaking file descriptors
- Handling filesystem structure inefficiently (e.g., scanning massive
.git
/node_modules
trees)
Metadata
Metadata
Assignees
Labels
No labels