ubuntu - MaxRequestsPerChild

Re: ubuntu - MaxRequestsPerChild

by Myles Carrick -
Number of replies: 0
APC on Ubuntu (Dapper and Edgy servers, anyway) is a cinch... couldn't be easier! From my install docs:

1. Install pear (and the various libraries for pecl to install)
apt-get install php-pear php5-dev apache2-threaded-dev

2. Fix a silly name/version change problem with apxs by adding a symbolic link to the right file
ln -s /usr/bin/apxs2 /usr/bin/apxs

3. Install apc
pecl install apc

4. Make sure that php knows to use it... edit /etc/php/apache2/php.ini and add
extension=apc.so

5. Restart Apache and you're away!
/etc/init.d/apache2 restart


Of course, try it out in your dev environment first... but it should yield significant benefits.

Cheers,

MC

NB. In my dev environment this worked perfectly... but a pecl setting shut me down on 64 bit Ubuntu... complained during the installation at step 3... something like "Fatal error: Allowed memory size of 8388608 bytes exhausted..." for some reason it's using its own ini values... (not either the php.ini values for cli or apache).

If so... edit /usr/share/php/pearcmd.php and add:
@ini_set('memory_limit', '16M');