Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Got a new server and the host installed APC for me.

Reloading apc.php shows that ACP resets itself every 4-6 seconds. Uptime is alyways 0 and hits never go above 3000.

The site runs smoothly but if APC really starts over again & again, I'd like to fix that.

The error_log doesn't show errors. The only thing I can find is an cronjob error on running some php script PHP Warning: Module 'apc' already loaded in Unknown on line 0.

Specs:

Ubuntu 12.04.4 LTS
SSD harddrive
Apache/2.2.22 (Ubuntu) DAV/2 mod_fcgid/2.3.9 mod_python/3.3.1
PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch (cli)
APC Version 3.1.7

apc.php snapshot:

Shared Memory   1 Segment(s) with 200.0 MBytes (mmap memory, pthread mutex Locks locking)
Start Time  31.05.2014 14:39:51
Uptime   0 minutes
File Upload Support 1
File Cache Information
Cached Files    161 (24.4 MBytes)
Hits    2423
Misses  161
Request Rate (hits, misses) 136.00 cache requests/second
Hit Rate    127.53 cache requests/second
Miss Rate   8.47 cache requests/second
Insert Rate 8.58 cache requests/second
Cache full count    0
User Cache Information
Cached Variables    0 (0.0 Bytes)
Hits    0
Misses  0
Request Rate (hits, misses) 0.00 cache requests/second
Hit Rate    0.00 cache requests/second
Miss Rate   0.00 cache requests/second
Insert Rate 0.00 cache requests/second
Cache full count    0
Runtime Settings
apc.cache_by_default    1
apc.canonicalize    1
apc.coredump_unmap  0
apc.enable_cli  0
apc.enabled 1
apc.file_md5    0
apc.file_update_protection  2
apc.filters [path to my apc.php]
apc.gc_ttl  3600
apc.include_once_override   0
apc.lazy_classes    0
apc.lazy_functions  0
apc.max_file_size   2M
apc.mmap_file_mask  
apc.num_files_hint  7000
apc.preload_path    
apc.report_autofilter   0
apc.rfc1867 0
apc.rfc1867_freq    0
apc.rfc1867_name    APC_UPLOAD_PROGRESS
apc.rfc1867_prefix  upload_
apc.rfc1867_ttl 3600
apc.serializer  default
apc.shm_segments    1
apc.shm_size    200M
apc.slam_defense    1
apc.stat    0
apc.stat_ctime  0
apc.ttl 7200
apc.use_request_time    1
apc.user_entries_hint   4096
apc.user_ttl    7200
apc.write_lock  1
share|improve this question
    
Relevant log file entries? –  Sven May 31 at 12:53
    
The error_log in my site's directory doesn't show errors. The only thing I can find is an cronjob error on running some php script PHP Warning: Module 'apc' already loaded in Unknown on line 0. Any other log files to check? –  Martin May 31 at 12:58
    
PHP Warning: Module 'apc' already loaded in Unknown on line 0. That means there are two references trying to load that module. The first succeeds, the second complains it's already there. –  AD7six May 31 at 14:05

1 Answer 1

the problem is mod_fcgid
read its manual page: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

impossible to share opcode cache, thats why you see different caches when apc is refreshed... suPHP is evil too.

use mod_fastcgi with php-fpm

p.s. some apc configurations required to set apc.enable_opcode_cache = 1

share|improve this answer
    
Thanks, will let the host have a look. –  Martin May 31 at 14:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.