Database and plugins issues.

After my site hit the 1GB database limit on my old shared hosting and I moved to a VPS server, I started having issues on Database that so many clients are not closing out tables in the database that eventually it maxes out the CPU and the DB crashes. And my plugins are causing my theme to crash too.

  • Patrick Freitas
    • FLS

    Hi Benjamin

    Sorry to hear you are having this problem.

    I made some debugs on your WordPress and found the following problems:

    [21-Feb-2020 13:08:01 UTC] PHP Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/iammarketing/public_html/blog/wp-includes/functions.php on line 4986

    This is coming from the plugin wp-content/plugins/visualmodo-related-posts/

    This issue is happening due to bad coding, and the plugin isn’t calling the scripts correctly, you can try to disable and replace the plugin or contact the plugin provider to report the problem.

    Another warning for the same plugin:

    [21-Feb-2020 13:08:16 UTC] PHP Notice: Undefined variable: img in /home/iammarketing/public_html/blog/wp-content/plugins/visualmodo-related-posts/visualmodo-related-posts.php on line 149

    This problem is happening because the plugin is calling an Undefined variable.

    [21-Feb-2020 13:08:17 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/iammarketing/public_html/blog/wp-includes/functions.php on line 4552

    This notice happens because WordPress attempts to flush the output buffers on shutdown. It fails because you have already called ob_end_flush().

    It usually stops by disabling the zlib.output_compression.

    [attachments are only viewable by logged-in members]

    However, I also suggest you run a Plugin and Theme test to find which plugin or theme is causing it.

    Plugin Conflict Test Gide:
    https://wpmudev.com/docs/getting-started/getting-support/#initial-troubleshooting
    Section E & F

    For this, you can use the WP_DEBUG() too, references on https://wpmudev.com/blog/debugging-wordpress-how-to-use-wp_debug/

    Finally two notices for /wp-content/plugins/sangar-slider/ plugin

    [21-Feb-2020 13:09:35 UTC] PHP Notice: The plugin metadata file does not contain the required ‘name’ and/or ‘version’ keys. in /home/iammarketing/public_html/blog/wp-content/plugins/sangar-slider/library-license-wordpress/tpluginUpdater.php on line 901
    [21-Feb-2020 13:09:35 UTC] PHP Warning: Creating default object from empty value in /home/iammarketing/public_html/blog/wp-content/plugins/sangar-slider/library-license-wordpress/tpluginUpdater.php on line 227

    Both problems seem to be related to a not working function on the plugin, you can try to find an alternative plugin or contact the plugin developer.

    Those are notices and warning that can be one of the reasons for the problem you are having. I suggest you start from those reported plugins and test and see if the issue is gone.

    Another issue that I noticed is about caching. I don’t see a cache plugin, it means that every website access is being done on a not cached page and the WordPress, Plugins and themes need to run all functions and this can cause High loads on the server.

    Having a cached page can help WordPress delivery the content and making fewer servers requests.

    I suggest you take a look on our Hummingbird plugin https://wpmudev.com/project/wp-hummingbird/

    Let us know if you need any further help on this.
    Best Regards
    Patrick Freitas

  • Benjamin
    • Design Lord, Child of Thor

    Hi Patrick,

    Thank you for looking into the issue. I feel we are just getting started on this here, but I have been at this since August of 2019 looking for AND PAYING TONS OF MONEY FOR a solution to this problem that never seems to be figured out.

    The issue is not solved with your suggestions. I am not sure how much of my conversation with the initial tech was conveyed to you, but what I can say is that I can uninstall the entire site (which I have done on many occasions – in fact, I have no idea how I am still sane) and then reinstall it and it will work perfectly for about three days. Then it will do EXACTLY the same thing every single time without variation. I can reproduce this every time I reset the site but no matter who I take this to and PAY MONEY TO, nobody can find why the theme and my current set of plugins will not work together. Nobody.

    I am ready to just give up. I am not an expert at WordPress. YOU ARE. I brought this here as a last ditch effort to get someone to actually DO something ON MY SITE, ON MY SERVER or WHATEVER it takes to get this set of plugins and this theme working together and all you gave me were suggestions I cannot carry out.

    You can imagine how frustrating that was.

    I cannot for the life of me figure out why the WORK cannot be done. I have spent over 1000 USD trying to get SOMEONE to actually DO THE WORK and fix my site. Nobody does anything, they just rip me off and say, oh the problem is on your end, please pay me now.

    I realize the problem is on my end, that is exactly WHY I am here now asking you to fix this issue. What is it going to take? How much money? What is the process of getting this fixed? Can you tell me that?

    Of course, there is a problem, but WHAT is the EXACT problem with this set of plugins and this theme that they will not work together? What is the EXACT problem that is causing clients to not close out tables? What is the fix for that? NOTE: this issue appears no matter what theme I use.

    When I first created this site, with the exact set of plugins you now see, I created it on shared hosting with IONOS.com. The site ran flawlessly for about three months. Then I ran into a database size limitation and the site shut down. Literally. Dead the same moment.

    I freaked out. I was making 200 dollars per week with adsense and my site reputation was skyrocketing.

    So I called IONOS and they said that shared hosting could not have a larger database limit. So they recommended VPS. So I got a bare metal VPS and PAID engineers to set up my server for this site. I installed the site and NIGHTMARE it did not work because server was not configured and I got hacked constantly. So I spent MORE MONEY and hardened the server and then uploaded the site again and this time it worked.

    For three days…

    Then I PAID MORE MONEY to a Database Engineer to find the problem with my crashing database and he said it was crappy coding in the plugins. Duh. Nobody could tell me what to fix. They were also not interested in fixing the issue.

    Repeat above process about ten times. Then I got TIRED of doing that and almost gave up. I switched out plugins, like you said, using conflict test (which I was already aware of and using before your suggestion) and it just did the same thing only different plugins triggered the EXACT SAME SYMPTOMS. Yes, exactly the same theme distortions.

    The plugins work just fine. But the theme will not render. There are many elements of the theme that drop out and this means that the functionality and availability of the footer, some slides on the home page, some functions in the customizer, and the footer on the posts and pages is gone awry.

    Also, after extensive talking with plugin authors, I appear to be the ONLY ONE experiencing this issue. I really want to know what is happening here and I would like YOU to help me do this. Are you willing and able to do so? I would be willing to take as much time as possible to work with you and give you any access you require to get this done.

    I just want to get back to where I was and have this site working with the current plugins.

    Please take the time to read this and respond. Thank you. Sincerely, thank you.

  • Benjamin
    • Design Lord, Child of Thor

    Hi Patrick,

    UPDATE: I just installed Hummingbird Pro and did a RETEST Of all the plugins by turning them all off and then turning them all back on again one at a time and found that they all work just fine with the theme on the home page now except Custom Sidebars. That is a WPMUDEV plugin. It is also very critical to the working of my site. Can you look into that plugin for me and see why it crashes my theme? The posts and pages do not show the footer when logged in, but show the footer when logged out? WIERD.

    I am crossing my fingers at this point. But everything seems to be working just great on the home page at least! Which is a vast improvement over my last post.

    Then again, I am not getting my hopes up. This has happened before AND the pages and posts are not rendering the footer or the admin bar when logged in. But what has NOT happened before is being able to get my site up and running without having to uninstall the whole site and restart again from scratch. So that is a first.

    Please check the plugin Custom Side Bars from WPMUDEV and report back.

    Also can you check my configuration of Hummingbird Pro. Not sure about anything I did in there. I did the best I could as NOOB! :slight_smile:

    Thanks,

    Benjamin De Mers

  • Kasia Swiderska
    • Support nomad

    Hello Benjamin ,

    I was checking your site and I noticed some of the anomalies that you mentioned.
    Just to confirm, have you also noticed that the menu on the site disappears? But not only on the front end, but actually in the Appearance -> Menu? After activating plugins and deactivating, menu items were just gone.
    But I don’t see anything particularly wrong there. There was a typo in one of the header script that was causing console error, I fixed it, there was misplaced constant in the wp-config.php so I moved it in right place, increased memory limit for WP, but it didn’t change things.

    Could you recreate the menu and send me a screenshot of it? Also if you have screenshots of the site of how it should look, that would be most helpful. I will then escalate this to our Second Line Support team to have a look on your site settings to see if there is something that could explain those issues.

    kind regards,
    Kasia

  • Benjamin
    • Design Lord, Child of Thor

    Yes I Noticed the same thing. The menu is still gone. I tried using the customizer to put the menu bak where it is is supposed to be but that did not help. It is still gone. Screenshots? No I am afraid I did not find any.

    You did not comment on the plugin Custom Sidebars. That is a WPMUDEV plugin that breaks my site.

    Can you please look into that specifically and see what is the problem with that plugin?

    Thank you,

    Benjamin

  • Benjamin
    • Design Lord, Child of Thor

    Okay I went into my cpanel and fixed a database issue with cleantalk plugin and the site went back to normal and the menu returned. Also the issue with the pages and posts is gone, Site seems to be working fine now except for the custom sidebars issue.

    I need you to look into that plugin,. I am reauthorizing you to enter my site and do the research to find out what is the issue.

    THank you
    Benjamin

  • Benjamin
    • Design Lord, Child of Thor

    Okay, now I have activated that plugin as well and it seems to be working fine as well. Grrr. Not sure what the issue is. I will monitor this and get back to you, Apparently the adjustments you did were enough to fix the issues on the site for now.

  • Rupok
    • Ex Staff

    Hi Benjamin,

    Please take some screenshots of your site now as you suggested so you can provide us in the future for reference. And don’t hesitate to contact us again if you face any other issue or if there is any issue still happening. We will be very glad to assist further.

    Regards,
    Rupok

  • Benjamin
    • Design Lord, Child of Thor

    Please feel free to add any comments in a text file in this drive account folder as well and I will read them. You can also post comments here. Either way.

    What I am concerned about now is the slow site speed. I have installed Query Monitor as well as Hummingbird and Smush Pro, but nothing seems to help. I REALLY need to get the load on the database lowered. What can we do? Please help me.

    Thank you,

    Benjamin De Mers

  • Benjamin
    • Design Lord, Child of Thor

    I am also concerned about the database connection errors that I am receiving. I get them A LOT. I suspect it is also an issue with the database receiving a heavy work load. It is no secret that my site uses a database hard. I expect that. But what I do not expect is that there is no way to help the database and plugins and site work well. What are your suggestions here? I have minified everything I can and I have hummingbird installed but nothing is helping the load on the server. I need your expert help on this. If we can get this solved I will be happy to use your service on a paid basis from now on.

    THank you,

    Benjamin

  • Rupok
    • Ex Staff

    Hi Benjamin,

    As you said your site has heavy database usage, I’ll suggest you to go through this tutorial and optimize your database as much as possible: https://www.shoutmeloud.com/reduce-wordpress-database-size.html

    You said you installed Query Monitor but that didn’t help to identify expensive database queries. That indicates that the hosting resources for the database process handling may be running out. I’m not sure about that, but you might discuss this with your hosting provider and you might need to upgrade to a hosting plan with higher resources. Please consult your hosting provider before upgrading and paying extra. Using Memcached on the server might also be a good idea to reduce database load.

    I hope this will help. Please let us know if you have any confusion or any further query. We will be very glad to assist further.

    Regards,
    Rupok

  • Benjamin
    • Design Lord, Child of Thor

    Actually it is crappy devs that I have the most problem with. Saying they will do something an then they don’t and/or say they did and then I find out they did not do something and then they say, “please pay me now.”

    For example, I have paid a dev many hundreds of dollars to service my server since August of 2019 when this whole nightmare began and he said he updated MySQL a few months ago but did not and even then ONLY NOW updated it from version 5.7 to version 10.1!

    Seriously. Like that is most likely the ENTIRE problem! So I am frustrated by that more than anything else bro.
    I will let you know if I need anything else. Thank you for your help.

  • Benjamin
    • Design Lord, Child of Thor

    I have uninstalled all your plugins. Once I did that, my CPU usage went from 100% down to 3%, just like it was before I started using your products. The site has ZERO errors and is lightning fast. You do the math. Anyways I will be cancelling my subscription to your services. Thank you.