Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting ulimits for apache on CentOS [closed]

Tags:

centos

ulimit

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

like image 715
user1405309 Avatar asked Dec 01 '25 05:12

user1405309


1 Answers

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.

like image 139
user1405309 Avatar answered Dec 04 '25 01:12

user1405309



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!