IntelliJ too many files open error

In IntelliJ IDEA 13.1.5 on Ubuntu 14.04 LTS I see a random error in large projects that says "too many files are open." Interestingly, it refuses to leave and completely freezes the IDE. I tried the following to fix this.

1) Modify my /etc/sysctl.conf so that this line is shown in this article here . The error was made with the error:

fs.inotify.max_user_watches = 524288 fs.file-max = 380180 

2) Raise the ulimit -n setting in the IntelliJ process to 64k. I don't notice any difference in performance with this, but the article I mentioned above claims it will help.

3) Add this to your idea64.vmoptions file (helps with indexing speed, but not with this problem)

 -Xms128m -Xmx8192m -XX:MaxPermSize=1024m 

Has anyone else seen this error, and do you have any other suggestions on what I can do to fix this?

I am considering IntelliJ support, but I found that I need to go back and forth with them several times before I get a helpful answer. Any community advice on this would be appreciated.

+5
source share
1 answer

I spoke with IntelliJ support. They suggested that part 2, which I mentioned, did not enter into force. I have done the following steps:

1) sudo vi / etc / security / limits.conf and add these lines (take a backup too):

 * soft nofile 380180 * hard nofile 380180 

2) sudo vi / etc / pam.d / common-session add this line (take a backup too):

 session required pam_limits.so 

3) sudo vi / etc / pam.d / common-session-noninteractive add this line (take a backup too):

 session required pam_limits.so 

4) Restart your computer

5) Confirm this by running this command, you should see this result

 ~$ ulimit -n 380180 

After that, I re-opened my large project, and since then I have not seen the message "too many files."

+8
source

Source: https://habr.com/ru/post/1204510/


All Articles