Recently, I've been plagued with Pants crashing mo...
# general
Recently, I've been plagued with Pants crashing more often. When Pants crashes, the below error message appears:
Copy code
native_engine.PantsdClientException: The pantsd process was killed during the run.

If this was not intentionally done by you, Pants may have been killed by the operating system due to memory overconsumption (i.e. OOM-killed). You can set the global option `--pantsd-max-memory-usage` to reduce Pantsd's memory consumption by retaining less in its in-memory cache (run `./pants help-advanced global`). You can also disable pantsd with the global option `--no-pantsd` to avoid persisting memory across Pants runs, although you will miss out on additional caching.

If neither of those help, please consider filing a GitHub issue or reaching out on Slack so that we can investigate the possible memory overconsumption (<>).
I tried following the two pieces of advice in the error message, but to no avail. What did help alleviate the crashing was closing all other running applications (I also cleared the Pants cache for good measure). I understand that Pants is being OOM-killed in this type of situation. However, the advice in the error message did not help me at all. Only after I closed all other applications did the crashing stop. Can this error message please be revised to include advice that is easier to understand and follow, i.e. closing all other running applications to reduce memory consumption?
Hi, thanks for the suggestion! Glad you found a solution. How would you feel about submitting a PR with this update?
I would be willing to submit a PR. It looks like the Contributor overview has an especially relevant section titled "Help wanted: identifying bad error messages":
We strive—but sometimes fail—to make every error message easy to understand and to give insight into what went wrong and how to fix it.
If you ever encounter a confusing or mediocre error message, we would love your help to identify the error message. Please open a GitHub issue with the original Pants command, the error message, and what you found confusing or think could be improved.
(If you'd be interested in then changing the code, we'd be happy to point you in the right direction!)
What is the best next step of action? Should I open a GitHub issue or a PR first? What exactly should I include in the issue or PR?
Since this is just a text change, and doesn’t require a lot of debate, I think a PR is fine!
Just modify the relevant error message, and explain your experience (as you did above) in the PR description
./pants --changed-since=main fmt lint
to ensure that your change passes the CI lint checks
Should be really straightforward!
I created this PR: I'd appreciate it if someone could take a look!
🙏 1
Thanks! Will look now
The PR has been merged! Thank you!
Thanks for the contribution!