XF 1.3 Maximum execution time of 60 seconds exceeded

Hi,

I am getting a few errors when trying to change a node permission for the 'registered' user group. E.g I wanted to revoke the permission to vote on polls for this group on a certain node and the error occured. The actual errors are almost the same.

Server Error Log
Error Info
ErrorException: Fatal Error: Maximum execution time of 60 seconds exceeded - library/XenForo/Model/Permission.php:1702
Generated By: tobi-the-fraggel, Today at 16:32
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(82) "PRTA - Project Reality Teamwork Alliance - Admin Control Panel Login | Admin CP - PRTA - Project Reality Teamwork Alliance"
["_GET"] => array(1) {
["node-permissions/awards-medals_749/user-group/save"] => string(0) ""
}
["_POST"] => array(3) {
["permissions"] => array(2) {
["general"] => array(1) {
["viewNode"] => string(5) "unset"
}
["forum"] => array(31) {
["viewOthers"] => string(5) "unset"
["viewContent"] => string(5) "unset"
["like"] => string(5) "unset"
["postThread"] => string(5) "unset"
["postReply"] => string(5) "unset"
["deleteOwnThread"] => string(5) "unset"
["deleteOwnPost"] => string(5) "unset"
["editOwnPost"] => string(5) "unset"
["editOwnPostTimeLimit"] => string(1) "0"
["editOwnThreadTitle"] => string(5) "unset"
["editOwnThreadFields"] => string(5) "unset"
["viewAttachment"] => string(5) "unset"
["uploadAttachment"] => string(5) "unset"
["votePoll"] => string(5) "reset"
["stickUnstickThread"] => string(5) "unset"
["manageAnyThread"] => string(5) "unset"
["undelete"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
["lockUnlockThread"] => string(5) "unset"
["hardDeleteAnyThread"] => string(5) "unset"
["hardDeleteAnyPost"] => string(5) "unset"
["editAnyPost"] => string(5) "unset"
["deleteAnyThread"] => string(5) "unset"
["deleteAnyPost"] => string(5) "unset"
["markSinglePost"] => string(5) "unset"
["markWholeThread"] => string(5) "unset"
["warn"] => string(5) "unset"
["doublepost_merge_minutes"] => string(1) "0"
["doublepost_bump_minutes"] => string(1) "0"
}
}
["user_group_id"] => string(1) "2"
["_xfToken"] => string(8) "********"
}
}
Server Error Log
Error Info
ErrorException: Fatal Error: Maximum execution time of 60 seconds exceeded - library/XenForo/Model/Permission.php:1629
Generated By: tobi-the-fraggel, Today at 16:39
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(82) "PRTA - Project Reality Teamwork Alliance - Admin Control Panel Login | Admin CP - PRTA - Project Reality Teamwork Alliance"
["_GET"] => array(1) {
["node-permissions/awards-medals_749/user-group/save"] => string(0) ""
}
["_POST"] => array(3) {
["permissions"] => array(2) {
["general"] => array(1) {
["viewNode"] => string(5) "unset"
}
["forum"] => array(31) {
["viewOthers"] => string(5) "unset"
["viewContent"] => string(5) "unset"
["like"] => string(5) "unset"
["postThread"] => string(5) "unset"
["postReply"] => string(5) "unset"
["deleteOwnThread"] => string(5) "unset"
["deleteOwnPost"] => string(5) "unset"
["editOwnPost"] => string(5) "unset"
["editOwnPostTimeLimit"] => string(1) "0"
["editOwnThreadTitle"] => string(5) "unset"
["editOwnThreadFields"] => string(5) "unset"
["viewAttachment"] => string(5) "unset"
["uploadAttachment"] => string(5) "unset"
["votePoll"] => string(5) "reset"
["stickUnstickThread"] => string(5) "unset"
["manageAnyThread"] => string(5) "unset"
["undelete"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
["lockUnlockThread"] => string(5) "unset"
["hardDeleteAnyThread"] => string(5) "unset"
["hardDeleteAnyPost"] => string(5) "unset"
["editAnyPost"] => string(5) "unset"
["deleteAnyThread"] => string(5) "unset"
["deleteAnyPost"] => string(5) "unset"
["markSinglePost"] => string(5) "unset"
["markWholeThread"] => string(5) "unset"
["warn"] => string(5) "unset"
["doublepost_merge_minutes"] => string(1) "0"
["doublepost_bump_minutes"] => string(1) "0"
}
}
["user_group_id"] => string(1) "2"
["_xfToken"] => string(8) "********"
}
}
Server Error Log
Error Info
ErrorException: Fatal Error: Maximum execution time of 60 seconds exceeded -library/XenForo/Model/Permission.php:1695
Generated By: tobi-the-fraggel, Today at 17:05
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(63) "PRTA - Project Reality Teamwork Alliance - Admin Control Panel Login | Admin CP - PRTA - Project Reality Teamwork Alliance"
["_GET"] => array(1) {
["user-groups/0-registered_2/save"] => string(0) ""
}
["_POST"] => array(8) {
["title"] => string(13) "0. Registered"
["display_style_priority"] => string(1) "0"
["user_title_override"] => string(1) "0"
["username_css"] => string(16) "font-size: 12px;"
["banner_text"] => string(0) ""
["banner_css_class"] => string(23) "userBanner bannerHidden"
["permissions"] => array(14) {
["teamspeak"] => array(3) {
["teamspeakAccount"] => string(5) "allow"
["teamspeakGroupID"] => string(2) "-1"
["teamspeakIdentityCount"] => string(2) "-1"
}
["general"] => array(24) {
["viewNode"] => string(5) "allow"
["view"] => string(5) "allow"
["viewProfile"] => string(5) "allow"
["search"] => string(5) "allow"
["maxTaggedUsers"] => string(2) "-1"
["editProfile"] => string(5) "allow"
["editCustomTitle"] => string(5) "allow"
["followModerationRules"] => string(5) "allow"
["bdtagme_groupTag"] => string(5) "unset"
["bdMedal_organize"] => string(5) "unset"
["bypassFloodCheck"] => string(5) "allow"
["report"] => string(5) "allow"
["viewIps"] => string(5) "unset"
["bypassUserPrivacy"] => string(5) "unset"
["cleanSpam"] => string(5) "unset"
["viewWarning"] => string(5) "unset"
["warn"] => string(5) "unset"
["manageWarning"] => string(5) "unset"
["editBasicProfile"] => string(5) "unset"
["aedbypass"] => string(5) "unset"
["aedviewreport"] => string(5) "unset"
["bdMedal_award"] => string(5) "unset"
["bdMedal_viewAwardedUsers"] => string(5) "unset"
["editSignature"] => string(5) "allow"
}
["forum"] => array(31) {
["viewOthers"] => string(5) "allow"
["viewContent"] => string(5) "allow"
["like"] => string(5) "allow"
["postThread"] => string(5) "allow"
["postReply"] => string(5) "allow"
["deleteOwnThread"] => string(5) "unset"
["deleteOwnPost"] => string(5) "unset"
["editOwnPost"] => string(5) "allow"
["editOwnPostTimeLimit"] => string(2) "-1"
["editOwnThreadTitle"] => string(5) "allow"
["editOwnThreadFields"] => string(5) "unset"
["viewAttachment"] => string(5) "allow"
["uploadAttachment"] => string(5) "allow"
["votePoll"] => string(5) "unset"
["manageAnyThread"] => string(5) "unset"
["stickUnstickThread"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["deleteAnyPost"] => string(5) "unset"
["deleteAnyThread"] => string(5) "unset"
["editAnyPost"] => string(5) "unset"
["lockUnlockThread"] => string(5) "unset"
["hardDeleteAnyPost"] => string(5) "unset"
["undelete"] => string(5) "unset"
["hardDeleteAnyThread"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["markSinglePost"] => string(5) "unset"
["markWholeThread"] => string(5) "unset"
["warn"] => string(5) "unset"
["doublepost_merge_minutes"] => string(4) "1485"
["doublepost_bump_minutes"] => string(1) "0"
}
["AVFCheckpoint"] => array(1) {
["autockeckOwnPosts"] => string(5) "unset"
}
["avatar"] => array(2) {
["maxFileSize"] => string(6) "512000"
["allowed"] => string(5) "allow"
}
["conversation"] => array(8) {
["start"] => string(5) "allow"
["receive"] => string(5) "allow"
["uploadAttachment"] => string(5) "unset"
["editOwnPost"] => string(5) "allow"
["editOwnPostTimeLimit"] => string(1) "5"
["maxRecipients"] => string(2) "10"
["editAnyPost"] => string(5) "unset"
["alwaysInvite"] => string(5) "unset"
}
["signature"] => array(14) {
["basicText"] => string(5) "allow"
["extendedText"] => string(5) "allow"
["align"] => string(5) "allow"
["list"] => string(5) "allow"
["image"] => string(5) "allow"
["link"] => string(5) "allow"
["media"] => string(5) "allow"
["block"] => string(5) "allow"
["maxPrintable"] => string(2) "-1"
["maxLines"] => string(2) "-1"
["maxLinks"] => string(2) "-1"
["maxImages"] => string(2) "-1"
["maxSmilies"] => string(2) "-1"
["maxTextSize"] => string(2) "-1"
}
["profilePost"] => array(15) {
["view"] => string(5) "allow"
["like"] => string(5) "allow"
["manageOwn"] => string(5) "allow"
["post"] => string(5) "allow"
["comment"] => string(5) "allow"
["deleteOwn"] => string(5) "allow"
["editOwn"] => string(5) "allow"
["hardDeleteAny"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["undelete"] => string(5) "unset"
["editAny"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["deleteAny"] => string(5) "unset"
["warn"] => string(5) "unset"
}
["donation"] => array(5) {
["donate"] => string(5) "allow"
["viewNav"] => string(5) "allow"
["viewIndex"] => string(5) "allow"
["viewDonations"] => string(5) "allow"
["viewDonors"] => string(5) "allow"
}
["mood"] => array(2) {
["view"] => string(5) "allow"
["have"] => string(5) "allow"
}
["dark_taigachat"] => array(9) {
["view"] => string(5) "allow"
["post"] => string(5) "allow"
["color"] => string(5) "unset"
["flood"] => string(5) "unset"
["modify"] => string(5) "unset"
["modifyAll"] => string(5) "unset"
["prune"] => string(5) "unset"
["ban"] => string(5) "unset"
["motd"] => string(5) "unset"
}
["EWRporta"] => array(2) {
["canCustom"] => string(5) "unset"
["canPromote"] => string(5) "unset"
}
["form"] => array(2) {
["viewFormsList"] => string(5) "allow"
["respondToForms"] => string(5) "allow"
}
["SteamAuth"] => array(2) {
["viewProfile"] => string(5) "allow"
["viewStats"] => string(5) "allow"
}
}
["_xfToken"] => string(8) "********"
}
}
Server Error Log
Error Info
ErrorException: Fatal Error: Maximum execution time of 60 seconds exceeded - library/XenForo/ContentPermission/Node.php:277
Generated By: tobi-the-fraggel, 19 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(82) "PRTA - Project Reality Teamwork Alliance - Admin Control Panel Login | Admin CP - PRTA - Project Reality Teamwork Alliance"
["_GET"] => array(1) {
["node-permissions/awards-medals_749/user-group/save"] => string(0) ""
}
["_POST"] => array(3) {
["permissions"] => array(2) {
["general"] => array(1) {
["viewNode"] => string(5) "unset"
}
["forum"] => array(31) {
["viewOthers"] => string(5) "unset"
["viewContent"] => string(5) "unset"
["like"] => string(5) "unset"
["postThread"] => string(5) "unset"
["postReply"] => string(5) "unset"
["deleteOwnThread"] => string(5) "unset"
["deleteOwnPost"] => string(5) "unset"
["editOwnPost"] => string(5) "unset"
["editOwnPostTimeLimit"] => string(1) "0"
["editOwnThreadTitle"] => string(5) "unset"
["editOwnThreadFields"] => string(5) "unset"
["viewAttachment"] => string(5) "unset"
["uploadAttachment"] => string(5) "unset"
["votePoll"] => string(5) "reset"
["stickUnstickThread"] => string(5) "unset"
["manageAnyThread"] => string(5) "unset"
["undelete"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
["lockUnlockThread"] => string(5) "unset"
["hardDeleteAnyThread"] => string(5) "unset"
["hardDeleteAnyPost"] => string(5) "unset"
["editAnyPost"] => string(5) "unset"
["deleteAnyThread"] => string(5) "unset"
["deleteAnyPost"] => string(5) "unset"
["markSinglePost"] => string(5) "unset"
["markWholeThread"] => string(5) "unset"
["warn"] => string(5) "unset"
["doublepost_merge_minutes"] => string(1) "0"
["doublepost_bump_minutes"] => string(1) "0"
}
}
["user_group_id"] => string(1) "2"
["_xfToken"] => string(8) "********"
}
}
I could probably go on like this. It slighty the same everytime I am trying to change a permission. Browser shows a 504.

Any Idea what could cause this? I can't remember changing anything important recently. On the other hand I can't remember when I last changed a permission for 'registered' user group.
 
How many nodes and user groups do you have?

You can try adding this to the library/config.php file to see if it allows it to complete:
PHP:
ini_set('max_execution_time', 180);
 
How many nodes and user groups do you have?

You can try adding this to the library/config.php file to see if it allows it to complete:
PHP:
ini_set('max_execution_time', 180);
I'll be honest. I have a lot...

Together with archives it's 399 nodes and 124 user groups.
I will give this a try:
PHP:
ini_set('max_execution_time', 180);
 
Actually it's not using 180 seconds.
hm..
I don't need to do anything else then appending the line you mentioned to /library/config.php right? Just like this:
PHP:
//$config['debug'] = true;

#$config['enableListeners'] = false;

#$config['cookie'] = array(
#   'prefix' => 'xf_',
#   'path' => '/',
#   'domain' => '.prteamwork.com'
#);
ini_set('max_execution_time', 180);
 
Na I'm just a bit slow today. It was a long day...
I thought it has to be in web directory. Anyways, I found it.

Alright, I assume you are talking about this setting (I couldn't find any other max_execution_time)
Still it does time out after 60 seconds :(
PHP:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 180

EDIT: and yes, I restarted php5-fpm service. I even restarted nginx just to be sure.
 
Last edited:
It's possible there may be another place setting it. Go to <url>/admin.php?tools/phpinfo and it should give you a list of the loaded php.ini files at the top. That may give you an idea where to look.

This is mostly related to the large number of nodes and permission group combinations -- it leads to having to rebuild a lot of information. It may be worth going to the "Rebuild Caches" page and running "Clean Up Permissions" as this may reduce the amount of work necessary. If not and we can't get the max_execution_time increased, I will likely need to identify a workaround via a code edit (should be fairly straightforward).
 
It's possible there may be another place setting it. Go to <url>/admin.php?tools/phpinfo and it should give you a list of the loaded php.ini files at the top. That may give you an idea where to look.
I checked all files mentioned here. Couldn't find anything. The only file containing the 'max_execution_time' setting is the one I mentioned and it didn't do anything.
oybVRL5.png


This is mostly related to the large number of nodes and permission group combinations -- it leads to having to rebuild a lot of information. It may be worth going to the "Rebuild Caches" page and running "Clean Up Permissions" as this may reduce the amount of work necessary. If not and we can't get the max_execution_time increased, I will likely need to identify a workaround via a code edit (should be fairly straightforward).
Makes sense.
Cache rebuild worked (y)
I must say though it's close to a minute till the permission actually gets accepted and our forum will not get smaller in the future that's for sure. I will keep the cache rebuild in mind but I think on the longer run your workaround with a code edit seems not to be avoidable. Anyhow, for now it's fixed. Thx for the advice @Mike :)
 
Top Bottom