ulimit

Windows equivalent of ulimit -n

泄露秘密 提交于 2019-11-28 12:37:36
What is the windows equivalent of the unix command " ulimit -n" ? Basically, i want to set the maximum fd limit via command prompt. hmm... I may have been wrong before - setmaxstdio (see here ) - but it is per-process, not system wide. I may be wrong, but I didn't think there was a limit to set in Windows... but unless you can say how this relates to programming, I expect this answer will be closed soon. If you are in the "IT Pro" area (rather than development), then there is a sister-site, serverfault.com - coming soon for this type of question. I don't believe that current Windows O/S have a

What does “ulimit -s unlimited” do?

北城以北 提交于 2019-11-27 18:58:05
There are understandably many related questions on stack allocation What and where are the stack and heap? Why is there a limit on the stack size? Size of stack and heap memory However on various *nix machines I can issue the bash command ulimit -s unlimited or the csh command set stacksize unlimited How does this change how programs are executed? Are there any impacts on program or system performance (e.g., why wouldn't this be the default)? In case more system details are relevant, I'm mostly concerned with programs compiled with GCC on Linux running on x86_64 hardware. When you call a

Too many open files ( ulimit already changed )

有些话、适合烂在心里 提交于 2019-11-27 13:54:44
问题 I'm working on a debian server with tomcat 7 and java 1.7. This is an application that recieves several TCP connections, each TCP connection is an open file by the java process. Looking at /proc/pid of java/fd I found that, sometimes, the number of open files exceeds 1024, when this happens, I find in catalina.out log the stacktrace _SocketException: Too many open files_ Everything I find about this error, people refer to the ulimit, I have already changed this thing and the error keeps

Python: ulimit and nice for subprocess.call / subprocess.Popen?

蓝咒 提交于 2019-11-27 09:19:15
问题 I need to limit the amount of time and cpu taken by external command line apps I spawn from a python process using subprocess.call , mainly because sometimes the spawned process gets stuck and pins the cpu at 99%. nice and ulimit seem like reasonable ways to do this, but I'm not sure how they'd interact with subprocess. The limits look something like: Kill the process if it's taking more than 60 seconds Limit it to 20% of cpu I want to apply the resource limiting to the subprocess, not to the

Windows equivalent of ulimit -n

大城市里の小女人 提交于 2019-11-27 07:07:45
问题 What is the windows equivalent of the unix command " ulimit -n" ? Basically, i want to set the maximum fd limit via command prompt. 回答1: hmm... I may have been wrong before - setmaxstdio (see here) - but it is per-process, not system wide. I may be wrong, but I didn't think there was a limit to set in Windows... but unless you can say how this relates to programming, I expect this answer will be closed soon. If you are in the "IT Pro" area (rather than development), then there is a sister

how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker

不羁的心 提交于 2019-11-27 07:05:20
I need to set the file descriptor limit correctly on the docker container I connect to container with ssh ( https://github.com/phusion/baseimage-docker ) Already tried: edit limits.conf the container ignore this file upstart procedure found at https://coderwall.com/p/myodcq but this docker image has different kind of init process. (runit) I tried to modify configuration of pam library in /etc/pam.d try to enabled pam for ssh in sshd_config The output it always the same. bash: ulimit: open files: cannot modify limit: Operation not permitted The latest docker supports setting ulimits through the

How to limit memory of a OS X program? ulimit -v neither -m are working

元气小坏坏 提交于 2019-11-27 00:57:14
My programs run out of memory like half of the time I run them. Under Linux I can set a hard limit to the available memory using ulimit -v mem-in-kbytes. Actually, I use ulimit -S -v mem-in-kbytes, so I get a proper memory allocation problem in the program and I can abort. But... ulimit is not working in OSX 10.6. I've tried with -s and -m options, and they are not working. In 2008 there was some discussion about the same issue in MacRumors , but nobody proposed a good alternative. The should be a way a program can learn it's spending too much memory, or setting a limit through the OS. After

How to change the stack size using ulimit or per process on Mac OS X for a C or Ruby program?

帅比萌擦擦* 提交于 2019-11-26 13:59:03
问题 It seems that the recommended way to set stack size for a C program or Ruby program (which uses the C stack), is by using ulimit in the Bash shell. But $ ulimit -s 8192 $ ulimit -s 16384 -bash: ulimit: stack size: cannot modify limit: Operation not permitted and sudo doesn't help either. Is there a way to set it to 16MB, 32MB, or 64MB? I thought there should be a way to set it per program invocation instead of setting a system wide parameter as well? Right now 8192 probably means 8MB which is