0

Laravel version 8.0 PHP version 7.4.25

when I run Laravel development server it stops after 300 seconds but the project works fine even after the error.

λ php artisan serve
Starting Laravel development server: http://127.0.0.1:8000
[Sun Oct 31 15:23:52 2021] PHP 7.4.25 Development Server (http://127.0.0.1:8000) started
PHP Fatal error: Maximum execution time of 300 seconds exceeded in F:\project\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php on line 59

Symfony\Component\ErrorHandler\Error\FatalError

Maximum execution time of 300 seconds exceeded

at F:\project\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:59
55▕ : now()->addDays(30)->getTimestamp();
56▕
57▕ $process = $this->startProcess($hasEnvironment);
58▕
➜ 59▕ while ($process->isRunning()) {
60▕ if ($hasEnvironment) {
61▕ clearstatcache(false, $environmentFile);
62▕ }
63▕

Whoops\Exception\ErrorException

Maximum execution time of 300 seconds exceeded

MMD
  • 35
  • 6
  • Does this answer your question? [How to solve a timeout error in Laravel 5](https://stackoverflow.com/questions/30270316/how-to-solve-a-timeout-error-in-laravel-5) – Nico Haase Oct 31 '21 at 12:15
  • @NicoHaase my php max_execution_time has been set to 300 seconds already – MMD Oct 31 '21 at 12:27
  • You should never use the serve method in your production environement – Aless55 Oct 31 '21 at 12:32
  • @Aless55 but i have set APP_ENV to local in .env file – MMD Oct 31 '21 at 12:49
  • If `max_execution_time` is set to 300 for the CLI version of PHP, it's more than obvious that the process is killed after 300 seconds. Also, `max_execution_time` does not care about `APP_ENV` – Nico Haase Oct 31 '21 at 13:32

1 Answers1

0

Increase maximum execution time in your server php.ini file.