dougao7801 2011-12-18 22:31
浏览 35
已采纳

为什么我用apc随机遇到这个致命错误(在Yii Framework中)?

I sometimes run into

Fatal error: require() [<a href='function.require'>function.require</a>]: apc_fcntl_lock failed errno:6 in C:\web\yii\framework\web\CWebApplication.php on line 345

code context:

        else
            $controllerID.='/';
        $className=ucfirst($id).'Controller';
        $classFile=$basePath.DIRECTORY_SEPARATOR.$className.'.php';
        if(is_file($classFile))
        {
            if(!class_exists($className,false))
                require($classFile);  ////////////THIS IS LINE 345
            if(class_exists($className,false) && is_subclass_of($className,'CController'))
            {
                $id[0]=strtolower($id[0]);
                return array(
                    new $className($controllerID.$id,$owner===$this?null:$owner),
                    $this->parseActionParams($route),
                );
            }
            return null;
        }

Relative runtime environment:

OS:win2k3.
PHP Version 5.3.6 
Server API  CGI/FastCGI

apc:
Version 3.1.8-dev
APC Debugging   Disabled
MMAP Support    Disabled
Locking type    File Locks
Serialization Support   php
Revision    $Revision: 308812 $
Build Date  Mar 1 2011 13:31:44

What caused this error? How do I fix it?

展开全部

  • 写回答

2条回答 默认 最新

  • doqp87012 2011-12-19 01:01
    关注

    This looks like an APC issue, which I also encounter from time to time. I can't tell you 100% what's going on, but, while developing you often change, move or overwrite files. APC then seems to loose the inode of the file which is used internally to handle to bytecode-caching.

    For me the only way to 'fix' the error is to restart the webserver.

    Does this also happen on production systems, where you don't change the sourcecode very often?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部