1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Search Exceeding Max Execution Time

Discussion in 'Troubleshooting and Problems' started by Warchamp7, Apr 4, 2015.

  1. Warchamp7

    Warchamp7 Active Member

    For some reason, doing a search to 'Find All Content Posted By Member' for certain members is reaching max execution time of 120 seconds. It doesn't apply to all members.

    How best to go about debugging something like this?
     
  2. Mike

    Mike XenForo Developer Staff Member

    Can you provide the actual error message?
     
  3. Warchamp7

    Warchamp7 Active Member


    ErrorException: Fatal Error: Maximum execution time of 120 seconds exceeded -library/XenForo/Model.php:223
    Generated By: ----------, Yesterday at 3:03 AM
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    Request State
    array(3) {
    ["url"] => string(51) "http://----------.com/search/member?user_id=258138"
    ["_GET"] => array(2) {
    ["/search/member"] => string(0) ""
    ["user_id"] => string(6) "258138"
    }
    ["_POST"] => array(0) {
    }
    }


    An alternative one


    ErrorException: Fatal Error: Maximum execution time of 120 seconds exceeded -library/Zend/Db/Statement/Mysqli.php:105
    Generated By: Unknown Account, Thursday at 10:10 AM
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    Request State
    array(3) {
    ["url"] => string(36) "http://----------.com/search/search"
    ["_GET"] => array(1) {
    ["/search/search"] => string(0) ""
    }
    ["_POST"] => array(13) {
    ["keywords"] => string(0) ""
    ["users"] => string(6) "----------, "
    ["date"] => string(0) ""
    ["reply_count"] => string(1) "0"
    ["prefixes"] => array(1) {
    [0] => string(0) ""
    }
    ["nodes"] => array(1) {
    [0] => string(0) ""
    }
    ["child_nodes"] => string(1) "1"
    ["order"] => string(4) "date"
    ["type"] => string(4) "post"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(18) "/search/?type=post"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    }
    }
     
  4. Mike

    Mike XenForo Developer Staff Member

    Unfortunately, PHP's fatal errors are not particularly debuggable because they don't give a backtrace. Both of those errors are in functions that are related to MySQL (the former fetching data, the latter closing a statement).

    It's certainly possible that there is an add-on involved that seems to be tripping for this particular user. It's very hard to say.

    That said, I will note that you have your maximum search results set to quite a large number. I ran a search for a user's content and it gave over 1900 results, so I'm assuming the max is 2000. This is 10 times the default. When a search is run, the permissions are checked for every matching piece of content. This setting has a direct influence on the amount of data retrieved from the DB and the amount of work done to verify the permissions.
     
  5. Warchamp7

    Warchamp7 Active Member

    Oh jeez, so it is. I have adjusted it and it has helped. Thanks
     

Share This Page