ERROR system error 24 (Too many open files) on Posit Workbench



You may see errors similar to the below when using Posit Workbench:

[rsession-<username>] ERROR system error 24 (Too many open files)

Note that <username> here is the username of the affected session. This type of error message usually relates to the underlying Linux server, and indicates that your operating system has reached the limit on the number of open files that can be open at any one time. It's worth noting that when an error message points out a particular session as above, this means that the issue only affects a single user rather than the system as a whole.



It's a good idea to use a command like lsofto check and see what processes are currently using a large number of file descriptors. Alternatively, we can increase the limit on the number of open files for the affected user.

To do so, you will need to modify your /etc/rstudio/rsession-profile configuration file with the below (you may need to create this file if it doesn't exist):

# /etc/rstudio/rsession-profile
ulimit -n 4096

It's worth noting that this file will need 755 permissions. You can run the following command to set this:

chmod 755 /etc/rstudio/rsession-profile

Save the above file, and then restart the RStudio service:

sudo rstudio-server restart

Once the R session has restarted, you should now see this value in effect by running the following commands in the R terminal:

system("ulimit -n")


system("ulimit -a")

Note that you may need to increase the ulimitvalue above to more than 4096 if you are still seeing the issue!


Support Ticket

If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly, and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here: