facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.57k stars 987 forks source link

Watchman is running at a lower than normal priority. #1015

Closed YajanaRao closed 2 years ago

YajanaRao commented 2 years ago

I am getting this error on react-native start.

I have tried watchman --no-spawn --no-local shutdown-server. Did not help.

The version is 2220410.024423.0

Watchman is running at a lower than normal priority. Since that results in poor performance that is otherwise very difficult to trace, diagnose and debug, Watchman is refusing to start. Fatal error detected at: (error retrieving stack trace

image

edapess commented 2 years ago

same issue

MichaelCuevas commented 2 years ago

The code that's preventing watchman from running is here: https://github.com/facebook/watchman/blob/main/watchman/main.cpp#L93-L98

You can tweak the min_acceptable_nice_value in your /etc/watchman.json

You could also try starting react-native with a higher nice value :)

If you're still having problems or have other questions, feel free to reopen the issue!

xxxserxxx commented 1 year ago

Thanks; I just delete the entire check.

MusfiqDehan commented 1 year ago

Nothing is working for me. Even I didn't find any etc/watchman.json file. So I have to remove the full watchman package. I am using Linux, and the command I use to remove watchman is:

sudo apt remove watchman

After that I run the below command to update the repositories:

sudo apt update && sudo apt autoremove && sudo apt autoclean

Now everything is working perfectly. My app is running.

Note: I know this is not an ideal solution. If anyone finds any better solution, please comment on this issue so that everyone can be benefited.

IncrediblePony commented 1 year ago

If you end up in a situation like me, where I don't have watchman installed through apt, but in a yarn package, the following may help:

EDIT: In addition to the steps above:

  1. Add a .watchmanconfig to your project if you happen to have watchman installed as a dependency in your proejct and have a homebrew installation, and add the following to that file:
    {
    "min_acceptable_nice_value": 8
    }

    Tweak as needed