Search code examples
phpzend-frameworkapc

Problems after apache2 graceful with APC


The problem is that after a apache2 graceful the apc won't work correctly. There is an error message in the apache error.log with "cannot redeclare class bughandlerabstract.

Normaly there is a class with this name, but the correct name ist BugHandlerAbstract.

After a apache2 restart it will work again.

I've tried some changes in the apc.ini, but nothing work right now. I tried also to exclude the BugHandlerAbstract.php from apc with apc.filters, but the problem was not solved.

Then i've done a Zend_Session::writeClose(); in our shutdown handler but also not solving the problem.

Here are the settings of the apc:

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 BugHandlerAbstract.php
apc.gc_ttl  3600
apc.include_once_override   0
apc.lazy_classes    0
apc.lazy_functions  0
apc.max_file_size   1M
apc.mmap_file_mask  
apc.num_files_hint  1000
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    768M
apc.slam_defense    1
apc.stat    1
apc.stat_ctime  0
apc.ttl 0
apc.use_request_time    1
apc.user_entries_hint   4096
apc.user_ttl    0
apc.write_lock  1

General Cache Information
APC Version 3.1.7
PHP Version 5.3.3-7
APC Host    app6.xxxxxxxxxxxx.de
Server Software Apache/2.2.16 (Debian)
Shared Memory   1 Segment(s) with 768.0 MBytes
(mmap memory, pthread mutex Locks locking)
Start Time  2011/05/20 11:18:48
Uptime  34 minutes
File Upload Support 1

Thanks


Solution

  • I had the same problem in my development box and to be honest I wasn't able to fix it with any proposed solution .

    APC is very good but i guess there is no solution to this issue . I guess its bug in APC so I would advise you to convert your cache host app6.xxxxxxxxxxxx.de to xcache and you would be able to convert to it easily in less than 1 hour , so save your time .