Hi all! I have got a kind of a FAQ problem all ove...
# general
Hi all! I have got a kind of a FAQ problem all over again, but no known solutions are helping... So I have a Pants project that I had on hold, and now got back to it. It had been working before, but now it doesn't anymore. I have a Python script that executes a couple of pants commands, to check some dependencies. Running it manually works ok, but running it via "PANTS_CONCURRENT=True ./pants run " doesn't, I get "Failed to begin watching the filesystem: Too many open files (os error 24)". This is with pants 2.14.0. Has anyone any suggestions about why it doesn't work anymore? Should I just find another way to run the script?
I found an alternative, by building a pex out of the script and running that. I guess the things that worries me is if there is a risk for this error to suddenly appear again, somehow...
This is a bit FAQy indeed. What steps did you take to solve too many open files in the past or in the current. Did you search on pantsbuild.org?
I'm holding back a link in case you can't find it, but you definitely get a search hit on that; so I'm wondering if you did that in the past, followed the instructions and are now hitting the issue again?
In the interest of async communications, that googleable link leads here: https://www.pantsbuild.org/docs/troubleshooting#too-many-open-files-error Please let us know if you had already found this and tried bumping your ulimits.
Yes, I have done all the suggestions in the FAQ, I have ulimit set to 100000 in the pants script, have checked /etc/security/limits.conf (or whatever it is called), etc. That information disappeared from my initial message when I edited it a bit. It gives the error only when I call the script "pants run", but it has been working before. I don't know what could have had changed since then...
The characters are very important here. You mean exactly
pants run
as in you've installed the
binary on your PATH and no longer use the
If so, that explains it.
You'll need to set ulimit elsewise.
I used "PANTS_CONCURRENT=True ./pants run myscript.py", like I mentioned in the initial post. And myscript.py uses subprocess.run() to call "./pants --filter-target-type=pex_binary list ::"
Ok, gotcha. So the later "pants run" was a typo / abbreviation. Well, since you still use
and you do set ulimit in it and that worked before this will be trickier to debug. At least those important details are now clear.
Someone else will have to help you from here. I need to be AFK for a while.
No problem, thanks a lot!