Announcement

Collapse
No announcement yet.

Admin Login Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Admin Login Problem

    I have been having an unusual problem with our 3.8X vB website recently. It is a big, busy site, that is functioning normally otherwise, except for this problem.

    For some time now, the admincp page has been taking longer and longer to load, but only if we weren't currently logged into it. If we were, it works just fine. In the last couple of days, if we attempt to access the admincp, some part of the process that loads the login page is timing out and we get a blank white page. No errors are being generated, we just get a blank white page.

    We can backdoor our way into the control panel by deleting a post, which prompts us for the admin password to complete. Once we have done that, the admin panel works just fine, until the logged in status times out. Then, we are back to the blank page when we try to access it.

    Does anyone have any ideas? I have been using vB for more than ten years and this has me stumped.

  • #2
    When you get logged in, go to vBulletin Options -> vBulletin Options -> AdminCP Settings. Turn off the "Control Panel Quick Statistics"

    Does this help?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      Hello. I turned that option off, but it had no effect. I also disabled the plugin/hook system, to see if any of the plugins running was causing the problem.

      Comment


      • #4
        I've narrowed the problem down a bit. I commented out the code below, in the global.php file in the admincp directory, in the 'Start Login Check' section and the problem disappears. The login screen comes up instantly and everything seems to work.

        PHP Code:
         #    // #############################################################################
        #    // Put in some auto-repair ;)
        #    $check = array();
        #
        #    $spectemps = $db->query_read("SELECT title FROM " . TABLE_PREFIX . "datastore");
        #    while ($spectemp = $db->fetch_array($spectemps))
        #    {
        #        $check["$spectemp[title]"] = true;
        #    }
        #    $db->free_result($spectemps);
        #
        #    if (!$check['maxloggedin'])
        #    {
        #        build_datastore('maxloggedin', '', 1);
        #    }
        #    if (!$check['smiliecache'])
        #    {
        #        build_datastore('smiliecache', '', 1);
        #        build_image_cache('smilie');
        #    }
        #    if (!$check['iconcache'])
        #    {
        #        build_datastore('iconcache', '', 1);
        #        build_image_cache('icon');
        #    }
        #    if (!$check['bbcodecache'])
        #    {
        #        build_datastore('bbcodecache', '', 1);
        #        build_bbcode_cache();
        #    }
        #    if (!$check['ranks'])
        #    {
        #        require_once(DIR . '/includes/functions_ranks.php');
        #        build_ranks();
        #    }
        #    if (!$check['userstats'])
        #    {
        #        build_datastore('userstats', '', 1);
        #        require_once(DIR . '/includes/functions_databuild.php');
        #        build_user_statistics();
        #    }
        #    if (!$check['mailqueue'])
        #    {
        #        build_datastore('mailqueue');
        #    }
        #    if (!$check['cron'])
        #    {
        #        build_datastore('cron');
        #    }
        #    if (!$check['attachmentcache'])
        #    {
        #        build_datastore('attachmentcache', '', 1);
        #    }
        #    if (!$check['wol_spiders'])
        #    {
        #        build_datastore('wol_spiders', '', 1);
        #    }
        #    if (!$check['banemail'])
        #    {
        #        build_datastore('banemail');
        #    }
        #    if (!$check['stylecache'])
        #    {
        #        require_once(DIR . '/includes/adminfunctions_template.php');
        #        build_style_datastore();
        #    }
        #    if (!$check['usergroupcache'] OR !$check['forumcache'])
        #    {
        #        build_forum_permissions();
        #    }
        #    if (!$check['bookmarksitecache'])
        #    {
        #        require_once(DIR . '/includes/adminfunctions_bookmarksite.php');
        #        build_bookmarksite_datastore();
        #    }
        #    if (!$check['noticecache'])
        #    {
        #        build_datastore('noticecache', '', 1);
        #    }
        #    if (!$check['loadcache'])
        #    {
        #        update_loadavg();
        #    }
        #    if (!$check['prefixcache'])
        #    {
        #        require_once(DIR . '/includes/adminfunctions_prefix.php');
        #        build_prefix_datastore();
        #    }
        #
        #    ($hook = vBulletinHook::fetch_hook('admin_global_datastore_check')) ? eval($hook) : false;
        #
        #    // end auto-repair
        #    // ############################################################################# 

        Does this give you any insight into what might be wrong? Something that is happening in this section of code is taking too long to complete and is causing the process to fail. Any ideas? Thanks again.

        Comment


        • #5
          After some more checking, if I comment out only this code, from the block of code above, the admin login works:
          PHP Code:
          #    $spectemps = $db->query_read("SELECT title FROM " . TABLE_PREFIX . "datastore");
          #    while ($spectemp = $db->fetch_array($spectemps))
          #    {
          #        $check["$spectemp[title]"] = true;
          #    } 
          If I comment out everything in the larger code block above, except for the few lines of code directly above, the problem occurs. Whatever these five lines of code do, they are causing the problem. Any ideas?

          Comment


          • #6
            OK. I spent several hours and discovered that the problem was caused by the size of the datastore table. There were 2.39 million records in the table, most of them old logincache entries. The process that fetched the titles of the entries and built them into an array was timing out and breaking things.

            I don't have a point of reference, but more than 2.3 million entries in the datastore table seems really excessive. Is this normal?

            Comment


            • #7
              Nothing? Does anyone from vBulletin even monitor this forum?

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X