Addressing large databases on the Grid


Browse by products and services

  • Applies to: Grid
    • Difficulty: High
    • Time Needed: 60+
    • Tools Required: SSH, phpMyAdmin

Overview

This KnowledgeBase article is intended for Grid users whose database needs exceed the reasonable thresholds of a shared hosting environment.

With a standard Grid, the size limit for databases is 4GB. With a GridContainer add-on service, this can be scaled as high as 8GB. For some users with larger databases, this may simply not be enough. If this is the case, and your databases have grown larger than the Grid allows, you will need to take action.

There are two preferred options to resolve this, detailed below. Please note that both options do feature a CloudTech solution.

Instructions

Truncate or modify the database(s) to fit

If you wish to stay on the Grid, you will need to modify your databases. Most likely, this will mean truncating your larger tables. In some cases, the problem can be solved by simply deleting some old logs, spam comments, or other junk data. To do so will require the assistance of a skilled database administrator.

To start, you will first want to identify the database(s) causing the problem. You can run a MySQL query to find out the size of each individual database.

  1. First, connect to your Grid via SSH.

    Once connected, you will need to connect to MySQL as the database administrator user. Run the following command to connect, and enter the database admin user’s password when prompted:

    mysql -h internal-db.s000000.gridserver.com -u db000000 -p

    Be sure to replace “000000” with your site number.
  2. Once connected, run the following MySQL query:

    
    SELECT table_schema "Database Name",
    sum( data_length + index_length ) / 1024 / 1024 "Database Size in MB"
    FROM information_schema.TABLES GROUP BY table_schema ;
                    

    This will output the name of each database and the corresponding sizes. With this information in hand, your database administrator will know which database needs work.

CloudTech Can Help!

CloudTech can, with the purchase of the $79.00 Database Administration service, investigate the problem for you and provide you with a similar report.

If the issue is clear cut (i.e. “junk data” as referenced above) they may be able to truncate the tables for you. In more complex cases, the assistance of a database administrator will still be needed to resolve the problem.


To learn more, please click here.

B. Move to a DV

If you would prefer to move to a DV, our VPS product, this is also an option. Our DV servers have larger disk space capacity, and no specific limitations on how you can use that data. This means your database can be as large as it needs to be, so long as it fits on the server. The following KnowledgeBase article has a full set of instructions for migrating to a DV.

CloudTech Can Help!

If you do not wish to handle this migration on your own, you also have the option to enlist CloudTech to migrate the sites for you. The CloudTech “Move a Site” service typically costs $100.00 for internal moves such as this.


To learn more, please click here.