FixedDeleting specific usergroup leads to timeout

Go to page

Well-known member

Been trying to clean up my usergroups a little, but consistently ran into timeout errors with one of the usergroup, while another one worked fine. I ended up nuking the group in the database (and on the live site in vBloat, so the importer will not even find them next time), but figured it might be worthwhile reporting here anyway.

I click the red cross, then confirm I want to delete the group. It hangs a while, and then throws the following error:

Fatal error: Maximum execution time of 60 seconds exceeded in <path to xf installation>/library/XenForo/Model/Permission.php on line 1643

The name of the usergroup in question was Tracker Testers, so it's not as if it contained weird characters or anything.

Well-known member

When deleting a mass of users in a usergroup means that the server doesn't really want to do that job because it's "too much work."

In other words, when the server is trying to reach an information that has a large file size, and it wants to delete it, that bulk of information is conflicting.

In an event of a time-out, it means the server can't reach that information. Especially if that information is conflicting with another.

In this case, it's the amount of members in the group interfering with the deletion of that group. xenForo devs need to figure out how the xf software is going to handle the deletion with information in that group (the users, permissions, etc.)

Well-known member

I ended up delving into the tables, writing a bunch of queries and a PHP script to help clear up lots of usergroups that were not defined (brought over from the vB import). Now my usergroup ids are nice and clean.

I ended up delving into the tables, writing a bunch of queries and a PHP script to help clear up lots of usergroups that were not defined (brought over from the vB import). Now my usergroup ids are nice and clean.

Well-known member

xf_user - contains a primary user_group_id column along with a varbinary array of secondary user groups, secondary_group_ids and a display group id column, display_style_group_id
xf_user_group - contains a list of valid group ids

Once these tables are cleaned up then rebuild the user cache which takes the data from xf_user and populates xf_user_group_relation. I had around 20 group ids that were not defined in XenForo and it was bugging me silly as the registered group was not set to group id 2 so users were not getting the right perms when logging in.