开发者

Problems after apache2 graceful with APC

开发者 https://www.devze.com 2023-03-07 01:37 出处:网络
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.

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.prel开发者_C百科oad_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


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 .


Dirk,

PHP 5.3.7 isn't a stable PHP 5.3.1.7 is considered outdated and has known bugs. Running latest stable might solve your problem. Do you get shutdowns and the can't redeclare class error when you run without APC turned on? Whats causing Apache to do a graceful?

Usually with a can't redeclare function or class error it's because the class or function is loading 2 times not because of being cached or not. PHP is pretty smart. Maybe

the apc.filters requires a regex. To exclude the class try:

apc.filters "\BugHandlerAbstract\.php$"

Try changing these sections.

apc.ttl 3600
apc.user_ttl  3600
apc.include_once_override   1
apc.lazy_classes    1
apc.lazy_functions  1
0

精彩评论

暂无评论...
验证码 换一张
取 消