mod_fcgid & apc

Events happening in the community are now at Drupal community events on www.drupal.org.
muschpusch's picture

Hey,

i read a lot at 2bits.com and decided to switch from mod_php to mod_fcgid. Now it seems like my apc cache is empty. (apc.php statistics says so). Do I need a special apc config? This is my apc.ini

extension=apc.so

apc.optimization=0
#SHMMAX is changed
apc.shm_size="480M"
apc.ttl=86400
apc.user_ttl=7200
apc.stat=1
apc.user_ttl=7200
apc.num_files_hint=0
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.cache_by_default=1
apc.rfc1867 = 1
apc.enable_cli=0

Kind regards!

Volkan

Comments

no shared memory when mod_fcgid is used

ogi's picture

Keep in mind that it's impossible to share APC cache between mod_fcgid PHP-CGI instances. You have to use PHP-FPM for that. mmap_file_mask doesn't help when it comes to mod_fcgid. You can check by lsof -p PHP-PID and see that different /tmp/apc.* are memory mapped in different PHP processes. So you may be served by one PHP process and see empty APC cache by checking another PHP process - they have separate caches. Try FcgidMaxProcesses 1 and see if APC cache is still empty.

I read some articles about

muschpusch's picture

I read some articles about PHP-FPM and some say that it's unstable in combination with apache. It seems to work fine with nginx but i don't want to switch to another webserver. Do you use php-fpm in combination with apache?

Thanks about the apc stuff! You are right all of them run an own apc instance.

i'm on nginx

ogi's picture

I use nginx + PHP-FPM with great success - the only problem is the unclear nginx docs :-) I haven't tried Apache + PHP-FPM

For me shared memory with APC

soyarma's picture

For me shared memory with APC is a pretty big reason to stick with mod_php... unless you are doing shared hosting.

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week