FatalErrorException错误:最长执行时间超过30秒

时间:2019-11-19 10:39:40

标签: docker nginx rabbitmq php-7.2 symfony-3.3

我正在尝试在docker中运行我的symfony 3.3项目。在docker之外工作正常。所有容器都在运行:nginx:alpine,php-fpm 7.2,PostgreSQL,rabbitMQ。

我收到此错误:

(1/1) FatalErrorException
Error: Maximum execution time of 30 seconds exceeded

in AnalyzeServiceReferencesPass.php (line 71)
at AnalyzeServiceReferencesPass->processValue()
in AnalyzeServiceReferencesPass.php (line 118)

dev.log

  

request.CRITICAL:未捕获的PHP异常   Symfony \ Component \ Debug \ Exception \ FatalErrorException:“错误:最大值   执行时间超过30秒”   /var/www/html/vendor/twig/twig/lib/Twig/Extension/Core.php第710行   {“例外”:“ [对象]   (Symfony \ Component \ Debug \ Exception \ FatalErrorException(代码:0):   错误:超过了30秒的最大执行时间   /var/www/html/vendor/twig/twig/lib/Twig/Extension/Core.php:710)“}

2 个答案:

答案 0 :(得分:1)

这意味着您的请求非常缓慢,因此您需要增加max_execution时间 max_execution_time = 900ini_set('max_execution_time', 900); 或更改请求驱动程序 还要检查您是否有无限循环

答案 1 :(得分:0)

在Docker文件中添加了

RUN echo "max_execution_time=900" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini行,使其正常工作。