XF 1.5 120 second timeout - where is it set?


Hi all,
I'm running into issues running an image conversion process on many many threads and am getting error messages about a
ErrorException: Fatal Error: Maximum execution time of 120 seconds exceeded
so I've asked my host, but they assure me that on our server
There is no timeout defined for CLI tasks. So the 120 second arbitrary limit you are seeing would look like you are setting it in your code.
by which I guess they mean it's set within Xenforo as we have nothing else on this server.
I can't see any mention of a timeout setting in my library/config.php file and tools/phpinfo says
max_execution_time    7200    7200
So where is this 120 second timeout restriction likely to be coming from?



XenForo developer
Staff member
I'd guess it's coming from the abstract deferred class, but presumably you're running custom code so you can just reset the time limit in PHP back to 0 (unlimited).


Just to follow up on this, I have the same timeout issue with rebuilding my attachment thumbnails where I'm getting a timeout, but the thing that's really confusing me is that it takes about 10 seconds of processing before the message comes back to tell me
Fatal error: Maximum execution time of 120 seconds exceeded in /domains/mydomain.com/http/forum/library/XenForo/Image/ImageMagick/Pecl.php on line 323
So something's not quite right somewhere.
Server error log says
Server Error Log
Error Info
ErrorException: Fatal Error: Maximum execution time of 120 seconds exceeded - library/XenForo/Image/ImageMagick/Pecl.php:323
Generated By: james, 4 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(61) "https://www.mydomain.com/forum/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  ["_POST"] => array(3) {
    ["redirect"] => string(42) "https://www.mydomain.com/forum/admin.php"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"