Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchservice requires high sensitivity on this system #183

Open
nunovieira opened this issue Mar 30, 2023 · 3 comments
Open

Watchservice requires high sensitivity on this system #183

nunovieira opened this issue Mar 30, 2023 · 3 comments

Comments

@nunovieira
Copy link

In VSCode, when Community Server Connector starts, the output shows many lines like:

17:30:35.171 [unch RSP Server] WARN o.j.t.r.s.f.FileWatcherService:206 - Watchservice requires high sensitivity on this system. Unfortunately it isn't present and thus watching the filesystem is unreliable. Please use openjdk or a sun jvm to allow us to use high sensitivity.

I believe it's using openjdk 11.
What could be done to solve this?

@robstryker
Copy link
Collaborator

Can you list your operating system and other relevant details? Also it'd be good to verify what jdk it's actually using if possible.

@nunovieira
Copy link
Author

macOS 13.2.1 with M1 Pro processor
openjdk installed via homebrew (brew install openjdk@11 and sudo ln -sfn /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk)

In VSCode settings:

    "rsp-ui.rsp.java.home": "/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home",

and the process is using that jdk:

  501 69876 69444   0 12:07   ??         0:09.98 /Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home/bin/java -Drsp.server.port=9000 -Dorg.jboss.tools.rsp.id=redhat-community-server-connector -Dlogback.configurationFile=./conf/logback.xml -jar /Users/nuno/.vscode/extensions/redhat.vscode-community-server-connector-0.26.6/server/bin/felix.jar

I also have Zulu 8 installed, but doesn't look to be used here.

What more information do you need?

@robstryker
Copy link
Collaborator

There's not much you can do here. Openjdk does not have a watch service that responds to filesystem or operating system events at this time. The implementation is completely polling-based, and thus will be slower, and could potentially miss events if for example a delete-file and create-file both occur between poll events.

There's really not much I can do on my end to fix this. Writing a custom mac filewatcher service appears to be something that even openjdk is struggling with, so the odds that I can do better are very low ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants