LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to limit php-cgi processes in lighttpd web server on embeddedb arm linux (https://www.linuxquestions.org/questions/linux-server-73/how-to-limit-php-cgi-processes-in-lighttpd-web-server-on-embeddedb-arm-linux-918867/)

golden_boy615 12-15-2011 07:13 AM

how to limit php-cgi processes in lighttpd web server on embeddedb arm linux
 
hello
I am working on a embedded arm linux with 64MB of memory that is realy important to me and I have a very big problem with my php-cgi processes.there is always 8 number of them even when there is no web page open and the consume too much memory as you can see:
Quote:

root 15190 11.8 6.4 14160 3940 ? R 16:20 1:23 /usr/bin/php-cgi
root 18530 10.9 6.4 14160 3928 ? R 16:23 0:53 /usr/bin/php-cgi
root 22371 0.0 6.1 13512 3764 ? Ss 16:02 0:00 /usr/bin/php-cgi
root 22374 0.0 6.1 13512 3764 ? Ss 16:02 0:00 /usr/bin/php-cgi
root 22376 0.0 6.1 13512 3764 ? Ss 16:02 0:00 /usr/bin/php-cgi
root 22378 0.0 6.1 13512 3764 ? Ss 16:02 0:00 /usr/bin/php-cgi
root 22379 2.2 6.2 13676 3860 ? S 16:02 0:40 /usr/bin/php-cgi
root 22384 4.3 6.7 13688 4112 ? S 16:02 1:17 /usr/bin/php-cgi
how can I limit the number of them to 4 or 5 or what ever that I found suitable for my system ?

Web31337 01-01-2012 07:22 AM

Can't you use php-fpm? It's way better than php-cgi standalone.

golden_boy615 01-02-2012 05:51 AM

no I can not and I do not want to get around the solution I want to solve it.

Web31337 01-02-2012 07:57 AM

Well then how do you start them? If it's spawn-fcgi there is an option for how many processes to start, -C.
Also, you don't really want them to run under root unless it's REALLY SECURE PRIVATE NETWORK and some other cases which still make this questionable solution.

golden_boy615 01-04-2012 02:39 AM

I start lighttpd and it starts them .


All times are GMT -5. The time now is 03:01 AM.