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

Fixed Deleting specific usergroup leads to timeout

Discussion in 'Resolved Bug Reports' started by SchmitzIT, Jan 16, 2011.

  1. SchmitzIT

    SchmitzIT 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.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Were there any members in the usergroup when you tried to delete?
     
  3. SchmitzIT

    SchmitzIT Well-Known Member

    Hi Brogan,

    Yup. About 30 of them, I think. Not too sure about the other usergroups that did go through, though I guesstimate they contained less than 10 each.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Ah, fair enough.
    I've just seen other reports with large numbers of members so wasn't sure if it was a similar issue.
     
  5. Mike

    Mike XenForo Developer Staff Member

    30 should probably be ok, though obviously it's not working - the other people had thousands. :)
     
  6. Marcus

    Marcus Well-Known Member

  7. Marcus

    Marcus Well-Known Member

    So how could I remove any of my usergroups? Is there any workaround?
     
  8. MGSteve

    MGSteve Well-Known Member

    Other than increasing the php memory limit no.

    If you're importing from vB - make sure you do it in there, it takes 2 seconds.
     
  9. Marcus

    Marcus Well-Known Member

  10. Carlos

    Carlos 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.)
     
  11. SchmitzIT

    SchmitzIT Well-Known Member

    Try adding a line to the config.php:

    ini_set('max_execution_time', 1000);

    This should increase the maximum time queries will be allowed to execute.
     
  12. Deebs

    Deebs 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.
     
  13. Marcus

    Marcus Well-Known Member

    That did not help with a value of 10.000 :(

    Do you remember anything of the tables where the usergroups are used?
     
  14. Deebs

    Deebs Well-Known Member

    There are a bunch of tables which had to be manipulated:
    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.
     
  15. MGSteve

    MGSteve Well-Known Member

    Mike advised not to do it by hand as it won't reset the permission tables with the removed groups.

    Unless you took this into account...
     
  16. Deebs

    Deebs Well-Known Member

    The removed groups did not exist therefore permissions did not change :)
     
  17. Dean

    Dean Well-Known Member

    Could you give an idea roughly how many members are in the user group you are trying to delete?
    (I have some decisions to make for my own forum)
     
  18. Marcus

    Marcus Well-Known Member

    30.000 users.
     
  19. Marcus

    Marcus Well-Known Member

    any ideas? I have a live forum with around 1 million posts and I really need to get rid of several usergroups.
     
  20. Dean

    Dean Well-Known Member

    ouch....
    I don't know the answer... but I can tell you the most users I can move from groupA to groupB is about 200/hour...

    I am moving all of mine manually.
     

Share This Page