【问题标题】:Symfony 2.5 receive a segmentation fault periodically on errorsSymfony 2.5 定期收到分段错误的错误
【发布时间】:2014-04-25 18:19:09
【问题描述】:

这是一个很难解决的问题。在任何错误类型上,页面都有可能因分段错误[Fri Apr 25 17:45:52.141251 2014] [core:notice] [pid 23298] AH00052: child pid 23367 exit signal Segmentation fault (11) 而崩溃。

我在 symfony 框架 2.5 上运行,有一个基本的页面路由和一个使用 Request 对象的控制器。

路线

form_core_page_loader_homepage:
     path:  /
     defaults: { _controller: FormCorePageLoaderBundle:Default:index }

控制器

use Symfony\Component\HttpFoundation\Request;
// this controller extends Symfony's and adds getStore() function and some others...
use FormCore\PageLoaderBundle\Controller\SessionStoreController as Controller;
use FormCore\PageLoaderBundle\Controller\StyleSessionStoreControllerTrait;


class DefaultController extends Controller
{
    use StyleSessionStoreControllerTrait;

    public function indexAction(Request $request)
    {


        $store = $this->getStore();

        if (!$store->initRequest($request)) {

            throw $this->createNotFoundException('That page does not exist.');
        }


        // grab our vars for the template...
        $templateVars = $this->getIndexVars();

        ....
    }

    protected functionIndexVars()
    {
        // this is where it goes kaboom
        $noticeErrorHere = $crashesWSegFault;
        ....
    }
}

有人遇到过任何与 symfony 类似的事情吗?我的猜测是它在某个地方捕获错误导致了问题,但是很难通过段错误进行故障排除......

【问题讨论】:

  • 我建议你添加xdebug扩展来查看正确的错误,限制最大嵌套级别为300,大多数情况下是循环递归。
  • 这也是我的想法。我添加了一个递归限制,从那以后我没有看到另一个段错误,但我也没有看到任何递归错误......
  • 可能是fastcgi错误,尝试添加IPCCommTimeout 3000 FcgidMaxRequestLen 1073741824 FcgidIOTimeout 3000
  • 请求和段错误之间没有延迟或超时问题。

标签: php apache symfony


【解决方案1】:

尽管 Symfony 2.5 将在接下来的几周内发布,但我还是回到了 2.4,这似乎已经解决了这个问题。

【讨论】:

    猜你喜欢
    • 2020-12-27
    • 2015-01-16
    • 1970-01-01
    • 1970-01-01
    • 2013-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多