-3

I'm trying to run my symfony 3.3 project in the docker. It's working fine out of docker. All containers are running: nginx:alpine, php-fpm 7.2, PostgreSQL, rabbitMQ.

I'm receiving this error:

(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: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: Maximum execution time of 30 seconds exceeded" at /var/www/html/vendor/twig/twig/lib/Twig/Extension/Core.php line 710 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 0): Error: Maximum execution time of 30 seconds exceeded at /var/www/html/vendor/twig/twig/lib/Twig/Extension/Core.php:710)"}

Jignesh Joisar
  • 9,467
  • 2
  • 46
  • 43
peter
  • 141
  • 2
  • 12

2 Answers2

1

Its means that your request is very slowly, so you need to increase your max_execution time max_execution_time = 900 or ini_set('max_execution_time', 900); or change driver of request also check if you have a infinite cycles

  • I did set this in php.ini file via `- ./docker/php-fpm/php-ini-overrides.ini:/etc/php/7.2/fpm/conf.d/99-overrides.ini` but nothing has changed. – peter Nov 19 '19 at 10:56
  • Add a volumes: section to your php service in the docker-compose.yml file, map a local directory with a custom.ini file to /usr/local/etc/php/conf.d, and restart your container. Whatever valid settings in that file will override those from the main php.ini file. This works in my own project: `php: volumes: - ./localpath/custom.ini:/usr/local/etc/php/conf.d/custom.ini` – Erwan Sturzenegger Nov 19 '19 at 11:06
  • Yes, this is basically what I did. But I moved to Dockerfile as `RUN echo "max_execution_time=900" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini` and it works ! Thank you ! – peter Nov 19 '19 at 11:10
1

RUN echo "max_execution_time=900" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini line added to Docker file made it work.

peter
  • 141
  • 2
  • 12