@kiteplans: kudos on lowering ThreadStackSize to a saner value, but I've missed the part where you've put MaxRequestsPerChild 1000... that's a good idea for prefork, but for worker use a very high number or 0 (unlimited).
This is my setup. All this PLUS MySQL is fitting in under half of Linode 512, leaving rest for cache.
apache.conf, mpm_worker section:
Code:
StartServers 2
ServerLimit 12
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 25
ThreadsPerChild 25
MaxClients 300
MaxRequestsPerChild 0
ThreadStackSize 1048576
Each of these 25-thread Apache worker processes averages around 8 (eight) MB RAM.
The master, and FCGI process manager add up to another 16 MB or so.
apache.conf, fastcgi section:
Code:
FastCgiConfig \
-idle-timeout 120 \
-initial-env PHP_FCGI_CHILDREN=16 \
-initial-env PHP_FCGI_MAX_REQUESTS=500 \
-killInterval 100000 \
-listen-queue-depth 300 \
-maxClassProcesses 1 \
-singleThreshold 0
Once again - don't use PHP_FCGI_CHILDREN with mod_fcgid, as it will think there's one parser and will execute one PHP script at a time. Use mod_fastcgi instead.
(And without PHP_FCGI_CHILDREN APC is much less useful because it can't share cache between parsers.)
Also, PHP_FCGI_MAX_REQUESTS is equivalent-ish of MaxRequestsPerChild in prefork+mod_php. PHP isn't good at memory management, so you want the parsers to respawn relatively often to keep memory leaks under control.
php.ini:
Code:
memory_limit = 32M
apc.shm_size = 64
Careful: I'm running a PHP-heavy site, so I'm running many parsers in parallel. They usually average to 16MB each.
But as I /need/ to allow the ability of uploading and thumbnailing large pics, the PHP memory limit is set to 32MB. Which means it might be possible to OOM (or at least swapthrash) it by starting a bunch of such image uploads in parallel.
These values would be safe for a Linode 1024, though, I think.