i
- 2024-07-01 - 2024/07/01/VSCode-Fails-To-Start-On-Ubuntu/

Today when I attempted to launch VSCode on my Ubuntu laptop it silently failed to load. I opened a terminal window on the command line and it still silently failed. No error message or any indication of what the issue could be was presented. After some internet sleuthing I found the command:

code --verbose

This helped me identify the following issue that I found in the output:

vscode ENOSPC: System limit for number of file watchers reached

I found the solution here, and it explains the issue in more detail.

sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p

This temporarily resolves the issue. To make these changes permanent:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

I believe the default value on my system was set to 8192. Strangely, I had been running this install for several weeks before I ran into this problem, running VSCode, Docker, Datagrip, Chrome with lots of open tabs, and other apps, and hadn’t started using anything new, so I’m unclear on what changed that caused this. Another one of life’s unsolved mysteries, I suppose!

Author: S. Eric Asberry
URL: https://blog.ericasberry.com/2024/07/01/VSCode-Fails-To-Start-On-Ubuntu/
keyboard_arrow_up