This has started a couple of weeks ago. I get this message on launching Rstudio:
Warning message:
File monitoring failed for project at "/directory/of/last/opened/project"
Error 24 (Too many open files)
Features disabled: R source file indexing, Connect, Diagnostics
It is pretty consistent and I think it is telling the truth, i.e. that an operating system out of file handles warning has been triggered by launching Rstudio (and hence R). I say that because if I launch Rstudio after running a lot of other things it's 100% reliable but if I launch Rstudio before other things it doesn't come up.
If I am just launching R from the command line I never see it and no other programs seem to create it. I assume that it's the combination of R and Rstudio that is greedy enough for file handles to trigger this.
I am reporting it here for a few reasons:
- I suspect it's useful for the Posit team to know of it
- I am surprised that the message references the last opened project despite that project not being opened and often not being at all the most recent thing I had used in Rstudio
- I am hoping that someone has some advice about how to up the ulimits to avoid the message (and the loss of Rstudio features).
I am running Rstudio (Free version, 2024.12.0 Build 4672024.12.0 Build 467) on Tuxedo.os (Linux tuxedo-os 6.11.0-108014-tuxedo #15~24.04.1tux2 SMP PREEMPT_DYNAMIC Fri Jan 17 14:36:48 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux) I had ulimit -n
at 1024 and ulimit -s
at 8192
With a lot of searching around what appear to be outdated instructions about how to reset these limits and a some reboots of the machine I can confirm I have not got these at 33000 and 8192 and the message has gone away.
I hope this is useful to someone, somewhere at some point!
Chris