我在控制器中有一个方法,这种方法延迟60秒。
Controller.php这样
public function methodAction(Request $request)
{
set_time_limit ( 0 );
<CODE............>
}
通过在google chrome android中测试移动版本获取错误。
request.CRITICAL:未捕获的PHP异常Symfony \ Component \ Debug \ Exception \ FatalErrorException:“错误:超过30秒的最大执行时间”在... \ prod \ classes.php第367行{“exception” :“[object](Symfony \ Component \ Debug \ Exception \ FatalErrorException(code:0):错误:超过30秒的最大执行时间.... \ var \ cache \ prod \ classes.php:367)”} [] classes.php
错误行是:
public function read($sessionId)
{
return (string) $this->handler->read($sessionId);
}
我认为这与会议有关。
我使用FOSUser来管理用户。
请帮帮我。
错误完成:
( ! ) Fatal error: Maximum execution time of 30 seconds exceeded in C:\dev\sfproject\erp\var\cache\prod\classes.php on line 367
Call Stack
# Time Memory Function Location
1 0.0008 138432 {main}( ) ..\app.php:0
2 0.0200 1112552 Symfony\Component\HttpKernel\Kernel->handle( ) ..\app.php:28
3 0.1213 9247304 Symfony\Component\HttpKernel\HttpKernel->handle( ) ..\Kernel.php:168
4 0.1213 9247864 Symfony\Component\HttpKernel\HttpKernel->handleRaw( ) ..\classes.php:4619
5 0.1214 9248240 Symfony\Component\EventDispatcher\EventDispatcher->dispatch( ) ..\classes.php:4649
6 0.1321 9538792 Symfony\Component\EventDispatcher\EventDispatcher->doDispatch( ) ..\classes.php:3635
7 0.1406 10018144 call_user_func:{C:\dev\sfproject\erp\var\cache\prod\classes.php:3720} ( ) ..\classes.php:3720
8 0.1406 10018264 Symfony\Component\Security\Http\Firewall->onKernelRequest( ) ..\classes.php:3720
9 0.1982 10842608 Symfony\Component\Security\Http\Firewall\ContextListener->handle( ) ..\classes.php:4975
10 0.1982 10843456 Symfony\Component\HttpFoundation\Session\Session->get( ) ..\ContextListener.php:83
11 0.1982 10843568 Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag( ) ..\classes.php:442
12 0.1983 10843648 Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start( ) ..\classes.php:179
13 0.1983 10843760 session_start ( ) ..\classes.php:113
14 0.1983 10844192 Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->read( ) ..\classes.php:113
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.