Setting ulimits for apache on CentOS
13,725
Finally I got the answer, above setting will help if you are using login for the user but there is no login for apache so you will have to put ulimit -H -n filno etc commands in your /etc/init.d/httpd script and restart the server. Hope this will help others.
Author by
user1405309
Updated on June 28, 2022Comments
-
user1405309 almost 2 years
I tried all the way to change the setting for ulimit parameters for apache running on CentOS. Here is the setting for my /etc/security/limits.conf
apache hard fszie 1024 apache soft fszie 1024 apache hard nproc 512 apache soft nproc 512 apache hard cpu 14 apache soft cpu 14 apache hard nofile 1024 apache soft nofile 1024
I rebooted my system as well but when I'm trying to check ulimit parameters for apache using a PHP script, they are not setting up. Is there something which I'm missing, do I need to create some other entry somewhere or some other parameter? Kindly suggest
-
Mircea Vutcovici about 8 yearsI think it is better to change /etc/sysconfig/httpd and add
ulimit -H -n 10240
, then restart apache.