Eclipse – “Too many open files” Problem
来源:互联网 发布:巅峰霍华德身体数据 编辑:程序博客网 时间:2024/05/19 10:38
转自:《http://blog.lckymn.com/2009/08/11/eclipse-too-many-open-files-problem/》
If your OS is Linux and you are using Eclipse, you might possibly see the following error messages or similar after installing lots of plug-ins in Eclipse. In my case, it usually happened after installing TPTP (I’m using Ubuntu Linux 9.04 Jaunty Jackalope Desktop 64bit by the way).
Plug-in org.eclipse.jst.server.tomcat.core was unable to load class org.eclipse.jst.server.tomcat.core.internal.TomcatLaunchConfigurationDelegate.
/eclipse_installed_path/eclipse/configuration/org.eclipse.osgi/.lazy.15 (Too many open files)
or
Problems occurred while trying to save the state of the workbench.
Could not read master table.
/your_workspace/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources (Too many open files)
or
java.util.zip.ZipException: error in opening zip file
This is because there are too many files opened and these are more files than the number of open files allowed . So Eclipse cannot open more files and displays the errors above.
Let’s see the number of open files.
$ lsof | wc -l
e.g.)
$ lsof | wc -l
8965
In my case, it was 8965.
What about the number of files Eclipse opens. To see it, use
$ lsof | grep eclipse | wc -l
In my case,
$ lsof | grep eclipse | wc -l
2094
2094 files are opened.
Now check the limitation of open files
$ ulimit -a
core file size (blocks, -c) #
data seg size (kbytes, -d) #
scheduling priority (-e) #
file size (blocks, -f) #
pending signals (-i) #
max locked memory (kbytes, -l) #
max memory size (kbytes, -m) #
open files (-n) 1024
pipe size (512 bytes, -p) #
POSIX message queues (bytes, -q) #
real-time priority (-r) #
stack size (kbytes, -s) #
cpu time (seconds, -t) #
max user processes (-u) #
virtual memory (kbytes, -v) #
file locks (-x) #
or just use
$ ulimit -n
1024
To change it, open the file /etc/security/limits.conf and put a greater number than 1024 depending on the number of open files you checked with lsof | wc -l just before.
For example,
Open the file
$ gksudo gedit /etc/security/limits.conf
add these lines
* soft nofile 9216
* hard nofile 9216
I just chose some big number that is 9216 (9 * 1024) as it’s greater than 8965
Log out and in then check with ulimit. It should show like this.
$ ulimit -n
9216
You may try this
$ ulimit -n 9216
yet I don’t believe it changes the limit for open files permanently. So you’d better modify /etc/security/limits.conf file.
If it is still not changed. Restart the computer and check again. If it still doesn’t show the changed value, open /etc/pam.d/common-session file and add session required pam_limits.so.
Open the file to edit
$ gksudo gedit /etc/pam.d/common-session
Add the following line
session required pam_limits.so
Log out and in. Now it should work!
view sourceprint?
$ ulimit -n
9216
- Eclipse – “Too many open files” Problem
- Eclipse – “Too many open files” Problem
- too many open files
- too many open files
- Too many open files
- too many open files
- Too many open files
- too many files open
- too many open files
- too many open files
- Too many open files
- Open Too Many files
- Too many open files
- Too many open files
- too many open files
- Too many open files
- too many open files
- too many files open
- 无符号数与有符号数转换的原理
- ok6410学习笔记(5.阻塞字符驱动)
- 【Linux操作系统分析】进程——进程切换,进程的创建和撤销
- 使用python libvirt 接口函数创建 dir 类型存储池、存储卷及删除 存储卷、存储池
- jQuery中 $.fn的用法
- Eclipse – “Too many open files” Problem
- C#程序集
- Linux 性能监控分析
- Linux中断 - PIC
- 查看ADT版本,安装、卸载、更新eclipse中的ADT
- VC2008中影响exe大小和速度的全部编译选项
- JS、replace 利用正则表达式 ,一次性替换SQL所有参数为数据
- C/C++中动态链接库的创建和调用
- gnuplot 的使用