Different stack size limit for different users, how can I make sure that all users have the same stack size set?
8,206
Okay, I found the solution.
It seems like it is set by default in the /etc/init.d/httpd
file .
I manually changed it on each server, restarted httpd
and now it's set correctly.
Related videos on Youtube
![Itai Ganot](https://i.stack.imgur.com/ICkw8.jpg?s=256&g=1)
Author by
Itai Ganot
Architect and Lecturer in the field of DevOps Engineering. LinkedIn: https://www.linkedin.com/in/itaiganot Personal Website: http://geek-kb.com
Updated on September 18, 2022Comments
-
Itai Ganot almost 2 years
I have a CentOS 6.4 server, when i run
ulimit -a
as root i get this:core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 92905 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 65536 cpu time (seconds, -t) unlimited max user processes (-u) 1024 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
When I run
ulimit -a
from apache's user, i get this:core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 92905 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 32768 cpu time (seconds, -t) unlimited max user processes (-u) 92905 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
How can i make sure that all users have the same stack size set?
Edit:
[root@web3 ~]# tail /etc/security/limits.conf #* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 * - stack 65536 apache - stack 65536 # End of file [root@web3 ~]#
apache's stack size is still 32768 even though i've changed this setting in
/etc/security/limits.conf
and rebooted the server. -
Itai Ganot over 10 yearsWell, I could be wrong to want that, I actually just want to set apache's limit to be as root's, you know how it can be done? The apache user doesn't have a home folder.
-
Itai Ganot over 10 yearsPlease check my question, I've edited it.