2

我在 Symfony2 中遇到了一个奇怪的错误。

在一个非常具体的情况下,我的控制器执行一个操作并呈现一个模板,通常的东西,但是在这样做之后,对应用程序的任何请求都会返回一个 ERR_EMPTY_RESPONSE 错误。

由于根本没有错误消息,我试图使用调试器找到它失败的地方。

应用程序执行的步骤列表如下:

网页/app_dev.php

$response = $kernel->handle($request);

应用程序/bootstrap.php.cache:2250

返回 $kernel->handle($request, $type, $catch);

应用程序/bootstrap.php.cache:2948

$response = parent::handle($request, $type, $catch);

应用程序/bootstrap.php.cache:2819

返回 $this->handleRaw($request, $type);

应用程序/bootstrap.php.cache:2834

$this->dispatcher->dispatch(KernelEvents::REQUEST, $event);

应用程序/缓存/开发/classes.php:1764

返回父级::dispatch($eventName, $event);

应用程序/缓存/开发/classes.php:1600

$this->doDispatch($this->getListeners($eventName), $eventName, $event);

应用程序/缓存/开发/classes.php:1667

call_user_func($listener, $event);

应用程序/缓存/开发/classes.php:2352

$listener->handle($event);

Symfony\Component\Security\Http\Firewall\ContextListener.php:90

$token = $this->refreshUser($token);

Symfony\Component\Security\Http\Firewall\ContextListener.php:165

返回$令牌;

当它到达这条线时,执行就停止了。这不是应用程序抛出的异常,因此您可能会想到 PHP 或 Apache 错误。
从那时起,应用程序将无法使用,直到您清除 Symfony 的缓存,然后应用程序才能再次运行。虽然如果我再次调用相同的操作,错误会再次出现。
这似乎表明框架对错误负有一定的责任。可能与用户身份验证有关,因为执行的最后几行与此有关。

我不知道如何深入研究这个问题。

有什么建议吗?

谢谢。

版本:
Symfony:2.3.6
PHP:5.4.9-4ubuntu2.3
Apache:Apache/2.2.22 (Ubuntu)

4

0 回答 0