No announcement yet.

Problem with Hourly Cleanup #2

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Hourly Cleanup #2


    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?

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


    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.


    • #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)");


      • #4
        Originally posted by Theo1990 View Post
        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?


        • #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.


          • #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.


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


              • #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
                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


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