This is very odd. I'm trying to set the ulimit
to 60000
via my startup.sh
:
#!/bin/bash
ulimit -n 60000
echo "Hello! File Descriptor set"
I can execute this with ./startup.sh
(755 file permissions) and the echo line is printed, and no errors are shown. However, when I do ulimit -n
it still shows 1024
, what's going on?
What I also find fascinating is I can type ulimit -n 60000
in the terminal, and then do ulimit -n
and it works perfectly. Why can't I set the file descriptor limit through a script?
Debian 8, 64-bit. OpenVZ Container