Hi all, I'm on a vps and maxclients set to 25 only. I'm not allowed to change this number as warned by my web host admins. Lately, my site will come to a halt when the max clients go above 25. I found this out when I SSH into my site and did a ps aux | grep httpd -c and realize the http clients are 27. The only way to get my site to start serving pages again is to do an apache restart. My question now. Is there a way I can execute a cron / script only when the max client hits 27? It's like in programming if > 26 then restart... something like this. Is this even possible?
Yeah, you could use a Perl or shell script in cron to restart apache when it hits that limit, however, I don't think that will be the best solution. Have you tried turning off keepalive requests? The other option is to upgrade to a better hosting plan. (I would say that this is your best option)