Announcement

Collapse
No announcement yet.

Repair / Optimize table not completing

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

  • [Forum] Repair / Optimize table not completing

    I am having a problem with the maintenance repair / optimize table routine. The routine is freezing with the words 'please wait...'.

    I tried this last week and the routine never completed, returning a 'too many connections open' error. I contacted my ISP who said:

    14141892 | alanrowley | localhost:32946 | www_thefollowon_com_community | Query | 4782 | Repair with 2 threads | OPTIMIZE TABLE `vbulletincache`

    This query "LOCKS" the database while it is running, this means no other queries can run on it while this one is, so all the connections to your site, and anything else you try and do are simply queueing until the above completes, and once the queue reaches 50 (our max connections limit) you will get the max connections error.
    My ISP had to access the database and close the connections manually.

    I am using the latest version - 4.1.12.

    I tried the routine again this morning and it has frozen again. I cannot access the forum or admin. What has gone wrong?

    vBulletin has sent me emails which say:

    mysqli_real_connect() [<a href='function.mysqli-real-connect'>function.mysqli-real-connect</a>]: (42000/1203): User alanrowley already has more than 'max_user_connections' active connections
    ALAN.

  • #2
    Did you try turning off your forum before trying to repair/optimize your tables?

    Why are you running the repair/optimize routine?

    Comment


    • #3
      You're triggering a limit that your "unlimited host" has implemented to keep resource usage down. There is no way around this in the software. You would have to check with your host to see if they sell additional connections.

      Turning off the forums does not lower the number of users connecting to the database nor does it prevent the software from connecting to the database. Every page load will still connect to the database to check to see if the forums are on, pull templates and the "Forum off" message. Plus page loads will generate sessions if needed.

      I suggest doing these operations via phpMyAdmin or the SSH command line. They are more efficient that way than what is built-in.
      Translations provided by Google.

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

      Comment


      • #4
        Thanks for the replies guys.

        I have run this maintenance routine fairly regularly since I set up the forum a couple of years ago, without any problems. I assumed I was keeping the forum tidy - maybe I have misunderstood the purpose of the routine.

        I don't turn off the forum prior to running.

        Maybe I should steer clear of what I don't understand in future.

        BTW, my hosting company managed to stop the script running and I have access back.

        ALAN.

        Comment


        • #5
          Originally posted by Alan Rowley View Post
          I have run this maintenance routine fairly regularly since I set up the forum a couple of years ago, without any problems. I assumed I was keeping the forum tidy - maybe I have misunderstood the purpose of the routine.
          Repair should only be run when you get a notice that a table has crashed and needs to be repaired. Then you should only repair the table that is broken.

          All Optimize does it optimize the storage files by removing data that you've already deleted. Otherwise it simply overwrites the deleted stuff with new data. You should only run this when you purge large amounts of data. Otherwise it isn't necessary.
          Translations provided by Google.

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

          Comment


          • #6
            Thanks for the explanation Wayne.

            Comment

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