Problem with Hourly Cleanup #2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Theo1990
    New Member
    • Sep 2009
    • 8
    • 3.7.x

    Problem with Hourly Cleanup #2

    Hello.

    I've got a problem with the Hourly Cleanup #2 of vBulletin. Before it was set to start 2 times a hour, but every time u wanted to check PMs or to go to the user panel (between xx.30 and xx.40 hour, so for 10 minutes) u couldnt get in. Now i set it to start just at 4 o'clock and its unbelievable how high the serverload gets (for hours, till 9 o'clock) and its often too much for the server so im getting http:ERRORS from 8-9 o'clock.

    My Question:

    What does the Hourly Cleanup #2 exactly do? And what can i do to solve the problem?
  • Andy
    Senior Member
    • Jan 2002
    • 5886
    • 4.1.x

    #2
    Look at the php file that gets run, it's located here:

    ./includes/cron/cleanup2.php

    Notice the part "Orphaned pmtext records are removed after one hour".

    Maybe the pmtext table is corrupted. Try running the repair and optimize on it to make sure there isn't any problems.

    I suggest you put the scheduled task cleanup2 back to run once an hour as normal.

    Comment

    • Theo1990
      New Member
      • Sep 2009
      • 8
      • 3.7.x

      #3
      pmtext Check Status: OK pmtext Optimize Status: OK
      So the problem must be anywhere else. Also i checked the other tables and get the same messege.

      Here the part in cleanup2.php:

      // Orphaned pmtext records are removed after one hour.
      // When we delete PMs we only delete the pm record, leaving
      // the pmtext record alone for this script to clean up
      $pmtexts = $vbulletin->db->query_read("
      SELECT pmtext.pmtextid
      FROM " . TABLE_PREFIX . "pmtext AS pmtext
      LEFT JOIN " . TABLE_PREFIX . "pm AS pm USING(pmtextid)
      WHERE pm.pmid IS NULL
      ");
      if ($vbulletin->db->num_rows($pmtexts))
      {
      $pmtextids = '0';
      while ($pmtext = $vbulletin->db->fetch_array($pmtexts))
      {
      $pmtextids .= ",$pmtext[pmtextid]";
      }
      $vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "pmtext WHERE pmtextid IN($pmtextids)");
      }
      $vbulletin->db->free_result($pmtexts);

      Comment

      • Andy
        Senior Member
        • Jan 2002
        • 5886
        • 4.1.x

        #4
        Originally posted by Theo1990
        but every time u wanted to check PMs or to go to the user panel (between xx.30 and xx.40 hour, so for 10 minutes) u couldnt get in.
        What happens exactly?

        Comment

        • Theo1990
          New Member
          • Sep 2009
          • 8
          • 3.7.x

          #5
          It just load and load and load but didnt open the page

          And today the script killed the server 2 times in the morning.

          Comment

          • Andy
            Senior Member
            • Jan 2002
            • 5886
            • 4.1.x

            #6
            Perhaps a plugin or template modification is causing this problem.

            Try to disable all plugins.

            Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

            define('DISABLE_HOOKS', true);

            Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates.

            Comment

            • Theo1990
              New Member
              • Sep 2009
              • 8
              • 3.7.x

              #7
              Hm isn't there another chance? Because some plugins are very important for me and the users.

              Comment

              • Lynne
                Former vBulletin Support
                • Oct 2004
                • 26255

                #8
                There is a hook in the script. Look to see if any of your plugins use that hook. See if disabling that particular product will fix things.

                Please don't PM or VM me for support - I only help out in the threads.
                vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                Want help modifying your vbulletin forum? Head on over to vbulletin.org
                If I post CSS and you don't know where it goes, throw it into the additional.css template.

                W3Schools &lt;- awesome site for html/css help

                Comment

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