Very slow pageload or queries on Membership 2

My issue is a very slow pageload - Membership 2 causes many queries and takes about 10 sec to load a page in backend .. and nearly 2.5 sec to load on frontend - how to improve that. Any page in backend is loading terrible slow. I have checked using Query Monitor plugin and the most impressive query comes from membership2 (nearly 10 sec).

  • Predrag Dubajic
    • Support

    Hi Rob,

    Hope you're doing well.

    I was checking the report on your site and it seems that the issue is with the number of invoices you have which is over 50.000 so get_posts for that is taking over 9 seconds.

    I have created a report for our developers to look into this further and see how can it be reduced with such a high number of invoices.

    Best regards,
    Predrag

  • Rob
    • Site Builder, Child of Zeus

    Hi Predrag,

    nice to read you! as we currently do not invoice our members, all the invoices can be deleted.. if that helps - go ahead. We plan to extend the usage of the Membership2 plugin to 100% within March 2019, then invoicing becomes a topic, not before.

    thx, Rob

  • Adam Czajczyk
    • Support Gorilla

    Hi Rob

    The issue does indeed seem related to the that huge number of invoices but it might be better to keep them there for a little bit longer until we got some additional information form the developers - just in case they'd need to check it.

    Or maybe you would be able to setup a staging site with all these invoices there?

    Such a staging site should be a "carbon copy" of the live one. We could then clean up all the invoices on the production site and if it confirms that this is the problem, we could actually use the
    staging site to investigate it if necessary. Would that be possible?

    Best regards,
    Adam

  • Rob
    • Site Builder, Child of Zeus

    Of course, Adam, it's possible to clone the current live site to dev.gaia-energy.org. Do you want me to do this? Anyway, I meant, if you see an advantage in deleting the invoices, simply go ahead - we don't need them.

    thx, Rob

  • Predrag Dubajic
    • Support

    Hi Rob,

    It would be best if you could set up a staging site on dev.gaia-energy.org, make sure that all invoices are there as well, and then clear up your invoices on live site.
    This would tell us if the issue is indeed with the invoices and would still leave us your staging site for testing ground to see how would be best to address this.

    Best regards,
    Predrag

  • Rob
    • Site Builder, Child of Zeus

    Hi Predrag,

    pls assist in deleting the invoices on our domain gaia-energy.org.
    Meanwhile, I deleted about 1k from backend hand have the feeling it's getting better. But deleting 50k in steps to 25/page is a mess - pls do it in the database directly. I could not find the table, the invoices are stored in. our page in general has about 170GB storage volume. To set a staging site right now would cause a space issue on our blade right now, if this comes up to 170 GB again.

    thx, Rob

  • Adam Czajczyk
    • Support Gorilla

    Hi Rob

    Thanks for letting us know and I'm sorry for the delayed response on my end.

    I'm glad that the site's now working better and thank you for confirming that this was indeed the culprit here. I understand that due to this there's no need to fix anything on your site now and we can consider it resolved. However, I have passed this information - that deleting these invoices helps - to our developers anyway so they could consider some ways of optimizing relevant code of the plugin in future.

    Thanks again for getting back to us!

    Have a nice day,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.