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

XF 1.1 Server Error When Created Nodes, Updating Usergroups

Discussion in 'Troubleshooting and Problems' started by taylor_smith, Mar 5, 2012.

  1. taylor_smith

    taylor_smith Well-Known Member

    Hello! We have just successfully imported our community from vBulletin 3.7, including nearly 100,000 users and over 2 million posts. During this process, we relied heavily upon assistance from Mike, who should definitely give himself a raise. (By the way, we're located here: http://community.stratics.com).

    I'm having two problems that I'm hoping to gain some insight in.

    Problem 1 : Server Failed to Respond

    Currently, I am unable to create new nodes. When I try, I receive this message: "The server did not respond in time. Please try again." The same happens when I try to add or remove a users to/from the administrative or super moderator usergroups. We do have a few plugins and several themes, but my non-technical understanding is that our dual-server setup is fairly robust:


    (a) Mysql Server​
    4 cores, 4gb of ram, 64 bit OS (CentOS).​
    We set up a 64gb drive. Our biggest db is 5gb, but we need to have enough space for the os, and also for the backups (so at least double the size of the dbs).​

    (b) Web Server​
    4 cores, 4gb of ram, 64 bit OS (CentOS again), using NGINX (not apache).​
    64gb of storage.​

    Mike suggested that we configure InnoDB, which we did and the site is much snappier now. However, I still can't create a node. ;_;

    Problem 2: User Group CSS Override

    We have a usergroup for our so-called "Managing Editors," who run the various portals on our network. They should have an administrator badge, which I've added to their user group css. However, this badge is being overridden by the super moderator user group's badge (Managing Editors are also super moderators). Is there any way I can cause the admin badge to be preferred over the super moderator badge?

    What is your opinion? Thank you!
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    How many groups and nodes do you have? If you have a lot then the permission calculations can take a long time and potentially lead to that timeout error. If you have excess or unused groups after the import then you can help the problem by consolidating them.
     
  3. taylor_smith

    taylor_smith Well-Known Member

    We have 16 usergroups. Most are important, but I think that we could probably prune 3-4 of these. How do I move thousands of users from one usergroup to another?

    We also have a lot of nodes. After 14 years, legacies are built. I really hope XF is substantially robust to handle our girth, because we aren't keen to lose peoples' content.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    When you delete a usergroup in XenForo it automatically moves all primary members of that group into the default Registered group (groupid 2).

    The permission calculations in XenForo are known to take a while if you have a lot of groups and nodes. It trades extra overhead at save time for optimal performance at run time.
     
    taylor_smith likes this.
  5. taylor_smith

    taylor_smith Well-Known Member

    Ok, I deleted a couple of the user groups, but when I try to delete the largest group (90,000 users), I get a "server error" message. :<
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Let's try to increase the limits then. Add these lines to your library/config.php file:

    Code:
    ini_set('max_execution_time', 5000);
    ini_set('memory_limit', -1);
    
    And edit this file:

    js/xenforo/xenforo.js

    Search for "3E4". Increase the value to "3E5". Then refresh the Admin CP to ensure you get the latest javascript.

    These changes effectively remove all relevant timeouts and limits. That should allow the changes to save assuming the new limits take (which sometimes they don't).
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    taylor_smith likes this.
  8. taylor_smith

    taylor_smith Well-Known Member

    Wow, how amazingly simple. Thank you!
     
  9. taylor_smith

    taylor_smith Well-Known Member

    Done! I still received the server error when trying to create a new forum or delete the big user group. However, the forum was actually created successfully, despite connotation to the contrary. That's good news! Still can't delete the big user group, but perhaps a quick prune feature will be added to future versions. I don't suppose there's a way to move folks into new groups in batches of a couple thousand, eh?
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In that case you can run this query to move all primary users of one group to another group:

    Code:
    UPDATE xf_user
    SET user_group_id = 2
    WHERE user_group_id = 5;
    
    But you have to rebuild the user cache after running this:

    Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches

    And this only does primary groups. Querying the secondary groups isn't so easy.
     
  11. taylor_smith

    taylor_smith Well-Known Member

    Cool. I'll ask our SYSOP to run this later. Thank you so much for your help, both of you!
     

Share This Page