我尝试在CentOS 5.5 Linux上为特定用户增加打开的文件限制。 我在/etc/security/limits.conf中添加了一个新行: seed hard nofile 10240 然后做testing: runuser -s /bin/bash – seed -c "ulimit -S -c 0>/dev/null 2>&1; ulimit -a" 0 core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 8185 max locked memory (kbytes, -l) 32 max […]
在Ubuntu 9中,我在我的服务器上收到一条消息: (node) Hit max file limit. Increase "ulimit -n" 但是,在terminal中input命令会显示以下内容: $ ulimit unlimited $ ulimit -n 65535 而一个netstat显示我只有〜1000个连接打开。 尽pipenetstat说我有1000个活动连接,但是我怎么可能达到65535的限制呢? 有没有人看到一个服务器configuration问题,我可能忽略或有进一步的debugging技巧?
我有一个糟糕的无限循环程序,我想在命令行运行 – 但不是永远。 我想使用ulimit,所以如果它永远循环,它会被切断。 我尝试着: $> bash -c "ulimit -t 1; java myinfloopprogram" 但是就像没有任何事情发生。 怎么回事,我的命令行命令是错误的? myinfloopprogram运行得很好。 我正在运行一个terminal,版本是Ubuntu 9.10。
我正在运行一个Ubuntu 10.04(lucid)samba文件服务器。 我有一个Windows 7的客户端,一次做数以千计的小文件的副本打开大量的文件。 它收到错误“太多的打开的文件”,在这一点上等待几秒钟,然后点击“再试一次”恢复下载。 我发现了很多参考文献,说增加可用于Samba解决问题的打开文件的数量。 我认为这是一个好主意,我正在拼命地尝试这样做…但不pipe我做什么,它拒绝打开超过1024个文件,复制问题不会消失! 这是我试过的: 我已经设置了ulimit -n 25000 。 我还设置了/etc/security/limits.conf来: * soft nofiles 25000 * hard nofiles 65000 root soft nofiles 25000 root hard nofiles 65000 我已经确保/etc/security/limits.d中没有任何内容覆盖这些内容。 我已经检查了sysctl fs.file-max = 199468,这已经足够了。 我无法find任何可能会干扰桑巴的apparmorconfiguration文件。 我已经添加了limit nofile 25000 65000节到/etc/init/smbd.conf 我在smb.conf中设置了最大打开的文件= 50000,并确认它通过samba日志文件生效: [2011/10/28 01:30:16, 0] smbd/open.c:151(fd_open) Too many open files, unable to open more! smbd's max […]
我想了解这里发生了什么。 linvx$ ( ulimit -u 123; /bin/echo nst ) nst linvx$ ( ulimit -u 122; /bin/echo nst ) -bash: fork: Resource temporarily unavailable Terminated linvx$ ( ulimit -u 123; /bin/echo one; /bin/echo two; /bin/echo three ) one two three linvx$ ( ulimit -u 123; /bin/echo one & /bin/echo two & /bin/echo three ) -bash: fork: […]
我在Ubuntu 10.04 64位上运行Squid 2.7。 我遇到了Squid耗尽文件描述符的问题,在/var/log/squid/cache.log中显示以下错误: 警告! 您的caching正在耗尽文件描述符 我检查了: squidclient mgr:info | grep'文件描述' 它表明我只有1024个文件描述符可用。 我更改了/etc/security/limits.conf,最后添加了这个: * soft nofile 32768 * hard nofile 32768 proxy soft nofile 32768 proxy hard nofile 32768 添加到/etc/squid/squid.conf: max_filedescriptors 32768 还改了/ etc / default / squid: SQUID_MAXFD=32768 没有什么工作。 最后我编辑了/etc/init.d/squid来添加“ulimit -n 32768”: #!/bin/sh -e # upstart-job # # Symlink target for initscripts that […]
我已经添加了2行 /etc/security/limits.conf myuser soft nofile 16384 myuser hard nofile 16384 …没有效果: su – sysctl -p su myuser ulimit -n 1024 无需用户首先login就可以生效,这是很重要的,也就是说,我以root身份为他开始脚本。
在共享服务器上(Debian Jessie),在/etc/security/limits.confconfiguration了一些内存限制(以及其他限制,如进程数量),这些限制适用于一组用户。 看来,这些限制并不适用于由cron开始的stream程,有时候人们的cron工作却意外地把所有其他的performance搞砸了。 有没有办法将limits.conf的限制应用于cron作业? 或者,如果这是不可能的,至less强制所有用户的cron作业的限制? Cron似乎在cron cgroup中运行所有的工作,而不是在用户的cgroup中,所以这不是一个简单的方法:
为了提高Ubuntu Linux机器上无头用户下运行的守护进程的FD限制,我们在/etc/security/limits.conf soft nofile 10000 hard nofile 10000 我们还在/etc/pam.d/login中添加了session required pam_limits.so。 所有已注销并重新login的用户都会反映这些更改。 无论新用户开始什么新的stream程,都会获得新的FD限制。 但是对于在无头用户下运行的守护进程来说,这些变化并没有得到体现。 在无头用户下运行的守护进程可以如何反映这些变化?
我如何增加我的ubuntu电脑上的星号守护进程的文件限制? 当我以root身份login并使用ulimit时,它说已经无限制。 我无法login为星号,因为该用户没有shell访问权限,它只是一个守护进程。 我可以看到/proc/<asterisk proc id>/limits当前最大打开文件是1024.我想加倍。 我什至进入/etc/security/limit.conf并添加 asterisk soft nofile 2048 asterisk hard nofile 2048 @asterisk soft nofile 2048 @asterisk hard nofile 2048 我重新启动服务器。 不过,最大打开的文件是1024。 我还可以做些什么?