2

I am using laravel with php-fpm and apache and i want to increase request timeout.

I tried set_time_limit(0) and ini_set('max_execution_time') but it not worked because i am using php-fpm.

When i add timeout = 300 or proxy_timeout = 300 on httpd.conf ( apache config ) problem solves But i want to do this on specific script.

Is there any solution for this problem?

Edit

Apache Version: 2.4.6

PHP: 5.6.31

OS: CentOS 7.2

Saeed Vaziry
  • 2,195
  • 5
  • 26
  • 39
  • You can't set a timeout for a specific script. I'll make a guess that you're doing a time-intensive task in this script, which you're triggering via browser - yes, that is absolutely a terrible decision. Look up [fastcgi_finish_request](http://www.php.net/fastcgi_finish_request) function and rework your logic so that you return a response to web server / client, but resume processing in the background. – Mjh Oct 17 '17 at 11:57

1 Answers1

0

If you want to change max execution time limit for php scripts.

vim /etc/php5/fpm/php.ini

SET:

max_execution_time = 300

Changes in PHP-FPM

SET

request_terminate_timeout = 300

Article Source : Set Max INI

MatHatrik
  • 762
  • 1
  • 6
  • 16