[Debian] File watcher failed repeatedly and is disabled

Currently I am using phpstorm with WSL2 all is working great except for the file watcher.

 

I am getting the following error: [Debian] File watcher failed repeatedly and is disabled. 

 

Is there a way i can debug this error? I would love for the file watcher to work.

24 comments
Comment actions Permalink

It seems that running file watchers against WSL-based commands is not supported at the moment.
Please vote: https://youtrack.jetbrains.com/issue/WEB-38925

0
Comment actions Permalink

Im not using any file watcher, i think its the default file watcher that checks if files are edited etc.

That functionality is quite handy and i was wondering if i could think of a workaround.

You know of any logs i could check?

0
Comment actions Permalink

Exactly the same issue here, and the documentation page does not help because this is about custom file watchers but its the default one.

I am on webstorm here.

'File watcher failed repeatedly and is disabled'

1
Comment actions Permalink

Sorry, I misunderstood you. Could you please restart the IDE, wait until the warning appears again, and then share the logs (Help | Collect Logs and Diagnostic Data)?

You can upload them privately here: https://uploads.services.jetbrains.com/

0
Comment actions Permalink

No problem,

Upload id: 2021_01_18_FAsty33dPyCtyt47 (file: phpstorm-logs-20210118-154152.zip)

Those are the logs i see this for sure in the go.local project. But i think it would be in all the projects.

 

 

0
Comment actions Permalink

Thanks! It appears to be this one: https://youtrack.jetbrains.com/issue/IDEA-126491
Could you please follow the reporter's advice and bump up the fs.inotify.max_user_watches value?

2
Comment actions Permalink

that seems to work! i see file changes popup in phpstorm.

Ill test some more tomorrow

0
Comment actions Permalink

This is working i see my file changes pop up now.

Although it seems rather slow, you know of a way or a guide to speed this up?

0
Comment actions Permalink

No, not really. Having notifications was already a huge performance improvement in 2020.3.
You shouldn't expect the WSL share to be as fast as a local drive though. Or is it slower dramatically for you?

0
Comment actions Permalink

Its workable right now!. thanks for the help. 

0
Comment actions Permalink

I am having the same issue. I am on Windows WSL2 Ubunto 18.04.

If I do: cat /proc/sys/fs/inotify/max_user_watches, I got '524288' back.
I have even set fs.inotify.max_user_watches = 524288 in sysctl.conf.

In the log it just said:
INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: C:\Program Files\JetBrains\PhpStorm 2020.3.1\bin\fsnotifier64.exe

Also it is said: INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational.
And then:
WARN - sl.WslFileWatcher.Ubuntu-18.04 - Watcher terminated with exit code 1
WARN - api.vfs.impl.local.FileWatcher - [Ubuntu-18.04] File watcher failed repeatedly and is disabled

How can I solve this?

 

 

0
Comment actions Permalink

Could you please also share your logs? Run Help > Collect Logs and Diagnostic Data and upload resulting archive using https://uploads.jetbrains.com/

0
Comment actions Permalink

Hi Dimitry,

I have uploaded the log at: Upload id: 2021_03_05_S5hfbEAtaed5UfRR (file: phpstorm-logs-20210305-160329.zip)
Do you have any news?

It looks my GIT repo gets a little confused about it.

0
Comment actions Permalink

Hi Gunnar,

Thanks for letting me know the upload ID. I don't see any similar reports on our tracker or in support portal. I also don't think you're experiencing the problem in https://youtrack.jetbrains.com/issue/IDEA-126491 - it was reported back in 2014, while the issue you've facing is related directly to new WSL filewatchers: 

WARN - sl.WslFileWatcher.Ubuntu-18.04 - Watcher terminated with exit code 1 

I would strongly advise to submit this separately to our tracker at https://youtrack.jetbrains.com/newIssue for developers to look into.

0
Comment actions Permalink

HI Dimitry,

I have done it.

Best regards
Gunnar

 

1
Comment actions Permalink

Thanks. Here's a link to YT report for anyone interested.

0
Comment actions Permalink

I am facing the same issues with PHPstorm 2020.3.3 and Unbuntu 20.04

0
Comment actions Permalink

Same issue, IJ Ultimate 2020.3.4 Ubuntu 20.04

 

0
Comment actions Permalink

on a related note, is there a way to restart the filewatcher when it fails like this, without restarting the whole IDE?

0
Comment actions Permalink

I'm facing the same issues with Windows 11, WSL 1.

Now this seems to be (?) the classic case of error message that comes too short in the information it provides: if the common solution is to change the '/etc/sysctl.conf' (and restart with `sudo sysctl -p`), why not add that information (or a link to it) in the error itself ?

 

0
Comment actions Permalink

Jan, we don't normally document bugs in the UI, and this is still our bug, even though the workaround has to be applied somewhere else.

0
Comment actions Permalink

That makes sense, if you plan to fix it -- I assumed there were not easy fixes (notice the bug is > 1 year old).

If you don't plan to fix it in the short term, a quick half-fix is just link to the solution in the error message displayed to the user.

0
Comment actions Permalink

This seems still to be an issue with PhpStorm 2022.1.2 and WSL 2: "File watcher failed repeatedly and has been disabled"...

Update: I tried to run the fsnotifier-wsl from WSL, but it was not executable, so i added the execution flag for the file: sudo chmod a+x /mnt/c/Users/{{user}}/AppData/Local/JetBrains/Toolbox/apps/PhpStorm/ch-0/221.5787.33/bin/fsnotifier-wsl

Right now it seems to work...

What is fsnotifier-wsl:

fsnotifier - IntelliJ Platform companion program for watching and reporting file and directory structure modifications

1
Comment actions Permalink

Yes, the issue is unfortunately still not addressed: https://youtrack.jetbrains.com/issue/IDEA-264207

0

Please sign in to leave a comment.