From 55e7bcb7ab40f1835cbdb0fe35420382fcc8351b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Feb 2021 22:14:46 +0100 Subject: [PATCH] Set max execution time --- htdocs/blockedlog/admin/blockedlog_list.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index f618042c994..3612343280a 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -73,6 +73,15 @@ $block_static = new BlockedLog($db); $result = restrictedArea($user, 'blockedlog', 0, ''); +$max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined +$max_time = @ini_get("max_execution_time"); +if ($max_time && $max_time < $max_execution_time_for_importexport) +{ + dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically."); + @ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300 +} + + /* * Actions */