这发生在 Ubuntu Release 12.04(精确)64 位内核 Linux 3.2.0-25-virtual
我正在尝试增加允许用户打开的文件数。这适用于我的 eclipse java 应用程序,其中 1024 的当前限制是不够的。
根据到目前为止我发现的帖子,我应该能够将行放入
/etc/security/limits.conf 像这样:
soft nofile 4096
hard nofile 4096
Run Code Online (Sandbox Code Playgroud)
增加允许所有用户打开的文件数。
但这对我不起作用,我认为问题与该文件无关。
对于所有用户,默认限制为 1024,无论 /etc/security/limits.conf 中的内容如何(更改该文件后我重新启动)
$ ulimit -n
1024
Run Code Online (Sandbox Code Playgroud)
现在,尽管 /etc/security/limits.conf 中的条目我无法增加:
$ ulimit -n 2048
Run Code Online (Sandbox Code Playgroud)
-bash: ulimit: open files: cannot modify limit: Operation not allowed 奇怪的是我可以向下改变限制,但不能向上改变 - 甚至回到低于原始限制的数字:
$ ulimit -n 800
$ ulimit -n
800
$ ulimit -n 900
-bash: ulimit: open files: cannot modify limit: Operation not permitted
Run Code Online (Sandbox Code Playgroud)
作为 root,我可以将限制更改为任何我想要的,向上或向下。它甚至似乎都不关心 /proc/sys/fs/file-max 中所谓的系统范围限制 …
所以,这周发生了一些奇怪的事情。Chrome 和 Chromium 已开始冻结并随后崩溃。我的系统一直运行良好,但 Chrome 和 Chromium 冻结然后关闭。我唯一能想到的可能是我打开的标签数量(几十个)。
无论如何,当我重新打开它们时,我会看到带有恢复选项的主页。我单击恢复,一切都开始加载,然后它再次冻结并崩溃,一切都关闭了。所以我根本无法恢复会话。(顺便说一句,有没有办法获得我打开的网站的列表?我无法在不崩溃的情况下恢复 chrome 或 chrome,所以我无法访问我的任何选项卡。)
看来这个人有类似的问题:chrome 在 Ubuntu 14.04 中崩溃太频繁。我尝试了那里提出的解决方案,但没有帮助。我什至不知道如何调试这个问题。有什么帮助吗?谢谢!
Chromium 37.0.2062.120 Ubuntu 14.04 和 Google Chrome 38.0.2125.104
编辑
我从终端运行它并收到这些错误。limits.conf今晚将尝试重新启动的方法。
[WARNING:flash/platform/pepper/pep_module.cpp(63)] SANDBOXED
[11401:11401:1028/111248:ERROR:browser_main_loop.cc(206)] /build/buildd/gtk+2.0-2.24.23/gdk/x11/gdkdrawable-x11.c:942 drawable is not a native X11 window (http://bugs.chromium.org/329991)
[11401:11438:1028/111248:ERROR:connection.cc(1060)] AppCache sqlite error 14, errno 0: unable to open database file, sql: SELECT cache_id, url, flags, response_id, response_size FROM Entries WHERE url = ?
[11401:11438:1028/111248:ERROR:connection.cc(1060)] AppCache sqlite error 14, errno 0: unable to open database file, …Run Code Online (Sandbox Code Playgroud)