Domain Mapping has got too many rows

I've got a question about the domain mapping plugin. I'm running a Query Monitor plugin because we've been experiencing slower than normal load times and the one plugin it always pulls up is the Domain Mapping Plugin as taking huge amounts of resources.

It's saying that the plugin has almost 55,000 rows in the database and we've only got about 800 total sites and maybe 250 or so that are using custom domains.

So my question is about whether it's possible to clean that out somehow without losing current data. The network has been around since 2011, so we do have legacy sites that have been deleted etc, but maybe only 1000 at most.

Please Advise

  • skishopmatt
    • Site Builder, Child of Zeus

    Hi Kasia -

    I do not have access to the database on my end, but I would be happy to have the hosting team get that for you. Can you please let me know exactly what to ask them? I am not a database guy, so I'm not sure how to ask for what you need. Thanks so much!

    Matt

  • Kasia Swiderska
    • Support nomad

    Hello Matt,

    I'm interested in those 55 000 rows in DB. Domain Mapping has tables named _domain_mapping and _domain_mapping_reseller_log (if you are not reselling domain that one should be empty).
    I'm interested if any of those tables has so many rows and if there are parts that are unusual - its very simple table, it has id's of sites and mapped domains:

    so in theory it should be 250 rows for each domain.
    It might be necessary to export that table so I could check it myself (you can upload it to service like dropbox and paste here link).

    kind regards,
    Kasia

  • skishopmatt
    • Site Builder, Child of Zeus

    Hi again -

    I was able to get the tables downloaded by our provider and ready for examination. How do I go about sending the link to those to you securely (i.e. not here on the public forum) :slight_smile:

    Let me know and I will have that sent over to you shortly.

    Thanks so much

    Matt

  • Kasia Swiderska
    • Support nomad

    Hello Matt,

    Thanks for the drop - but those tables don't have 55k rows inside (exactly how the hosting company said). Those are very small tables with two dozens entries.
    They are talking about the 55k tables. Can you confirm that it is about 55k of domain mapping tables? So all tables that have in name _domain_mapping and _domain_mapping_reseller_log (they might have different prefixes)?

    kind regards,
    Kasia

  • skishopmatt
    • Site Builder, Child of Zeus

    Hi Kasia -

    I've sent them a follow up with your message and questions. I wanted to also show you this screenshot as this is what triggered the team on our end to start to research this issue. We've been trying to determine what's been causing the lag time between loads on each page and our Query Monitor software keeps flagging the domain mapping plugin as the "issue" - Again, I know nothing about DB's so I'm flying blind here :slight_smile: I'll let you know what they say when they reply to me.

    Thanks so much for your continued help!

    Matt

  • Kasia Swiderska
    • Support nomad

    Hello skishopmatt,

    I have seen this error, but I will need to know what are those rows that Query Monitor is flagging. If Domain Mapping is creating multiple tables then seeing then and whats inside will help us determine what is wrong.
    Did your sysadmins answer? Let me know

    kind regards,
    Kasia

  • Dan Berdal
    • Design Lord, Child of Thor

    I'm investigating the same issue. Version 4.4.3.3 of the domain mapping plugin runs a show tables query, and appears to be looking through all tables in your database. Your database has 55k+ tables.

    Query monitor shows the offending lines of code as:

    domainmap_launch()
    wp-content/plugins/domain-mapping/domain-mapping.php:144
    Domainmap_Plugin->set_module()
    wp-content/plugins/domain-mapping/classes/Domainmap/Plugin.php:174
    Domainmap_Module_System->__construct()
    wp-content/plugins/domain-mapping/classes/Domainmap/Module/System.php:45
    Domainmap_Module_System->_upgrade()
    wp-content/plugins/domain-mapping/classes/Domainmap/Module/System.php:134
    Domainmap_Module_System->table_exists()
    wp-content/plugins/domain-mapping/classes/Domainmap/Module/System.php:206

    I wrote up my own ticket here: https://premium.wpmudev.org/forums/topic/domain-mapping-domain-mapping-4-4-3-3-high-database-cpu-load#post-1352415

    I know that the previous version of domain mapping 4.4.2.4 did not have this problem, but I'm not sure about intermediate versions. 4.4.2.4 was the last version that I found to work correctly, so if you're going to roll back, I'd go back to that version.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.