I have PHP5-CGI installed, Apache, and MYSQL installed. Prior to adding these settings, PHP5-CGI would endlessly have >15 processes, each eating up 5 mb of ram. So I added these settings to /etc/apache2/conf.d/php5-fcgid.conf and the PHP5-cgi processes were limited. However, now, everytime I open let's say 20 threads/pages in 4 or 5 minutes, the server stops running properly, things freeze and pages stop loading, until 2 or 3 minutes pass by, then it's lightening bolt fast again.
AddHandler fcgid-script .fcgi .php # Where to look for the php.ini file? DefaultInitEnv PHPRC "/etc/php5/cgi" # Where is the PHP executable FCGIWrapper /usr/bin/php-cgi .php # Maximum requests a process handles before it is terminated MaxRequestsPerProcess 1500 # Maximum number of PHP processes. MaxProcessCount 15 # Number of seconds of idle time before a process is terminated IPCCommTimeout 240 IdleTimeout 240 # Large site ServerLimit 2048 ThreadLimit 100 StartServers 10 MinSpareThreads 30 MaxSpareThreads 100 ThreadsPerChild 64 MaxClients 2048 MaxRequestsPerChild 5000
I am running a website (smf forum) that averages around 450 users per 20 minutes, so it gets a little hectic. So, what's going on?