WordPress sites timing out. Help needed!

[ad_1]

We’ve got two sites, each generating as much as 500GB traffic per month, and they’ve been running for over a decade. We’ve recently launched clean, beautiful new sites for them, reducing the number of plugins etc. We ran test sites first with no issues.

The first new look site (www.whatsonincapetown.com) was launched in May and has been running fine til the second site (www.whatsoninjoburg.com) was launched 10 days ago, when they both started to run slow. Since then the Joburg site has often been timing out.

We have a dedicated server for the two sites. It seems that issues on the CT site are having a knock on effect on the Joburg site. Can this be right? Or is it more likely that they both have issues, and the timing is coincidental?

We are trying to reduce the load on the server by compressing images (Smush Pro), deleting old emails that have been stored on the server etc, but obviously the action of doing this is creating more strain in the meantime. We’re also using WP Rocket on the Cape Town site and the Smush Pro CDN on the Joburg site.

The Cape Town site is reaching max_children, so we’re trying to get the host to increase the PHP-FHM configuration.

It seems there are potential (expensive) plugins that we could use to help, but a) we don’t have a lot of money and b) presumably those would be bypassing the problem rather than addressing it.

Any advice gratefully received!

[ad_2]
5 Comments
  1. My suggestion is to install a plugin like Wordfence to rule out that there is no active malware.

    Then you can uninstall the plugins one by one to see that there are no conflicts between various plugins causing the slowdown. If there is no malware and the plugins are ok then the problem is on the server side

  2. “We are trying to reduce the load on the server by compressing images (Smush Pro), deleting old emails that have been stored on the server etc, but obviously the action of doing this is creating more strain in the meantime.”

    Your looking completely in the wrong direction here. Those are static assets – and do not cause anything to the load. Your looking towards the database, CPU intensive stuff as a file system is pretty much zero to none.

    Try litespeed (enterprise) and configure it properly (proper caching) followed with Object cache with a duration of at least 24 hours (database cache).

  3. If the same server delivers the two sites, it’s possible you are overwhelming your MariaDB / MySQL server. Paradoxically, the way you handle this problem is by *reducing*, not increasing, max_children. Less concurrent database access improves overall throughput.

    How much RAM does your server have? How many cores? Is the MariaDB / MySQL server on localhost, or on a separate machine? Depending on your traffic and the answers to these questions you may have to up-provision your server (pay more for better service).

    Add a [persistent object cache plugin](https://developer.wordpress.org/reference/classes/wp_object_cache/#persistent-cache-plugins). Notice that object caching is different from page caching. (The object caching subsystem handles frequent updates correctly.)

    I’ve been spending my time working on database-side optimizations. [Here is my writeup](https://www.plumislandmedia.net/wordpress/performance/optimizing-wordpress-database-servers/).

    Working on image size is good, keep doing it. But, at least from my perspective here in North America, your problem is timeouts on your HTML pages. Image size isn’t the root cause of that problem.

    (Capetown looks like a good place to have fun! Too bad I’m so far away.)

  4. Running the two websites on the same server is absolutely the issue.

    **Assets are NOT the problem**

    Unless you’re loading GB large videos, minimising asset size will not reduce server timeouts. your problem will lay with bottlenecks at either the app level (PHP) or the data level (MySQL).

    Generally speaking, a WordPress website will not have any long-running processes, which means that resource usage is only high for a very very small period for each page load (200ms, at most). Unless your website has well over 120 visitors per minute, you can rule out the actual operating load of the website.

    What you’ll most likely find the cause to be is either a memory leak, or broken script (think endless loops, or anything that will eat resources.)

    **Solutions**

    Sure, you can throw more resources at the problem (upping ram, CPU), but that treats the symptom and not the problem. You’ll want to review the resource usage on the server by using HTOP or similar to diagnose where the resource usage is coming from.

  5. The Network tab of your browser’s devtools is your friend.

    On your front door page Javascript file called mb_forms.js is sending a message to admin_ajax.php every fifteen seconds. These are piling up, because it takes your server more than 40 seconds to respond to each one.

    This means that each page open on your site from any visitor is hammering on your server even when the visitor isn’t doing anything but reading.

    I can’t tell from https://wpdirectory.net/ what plugin that Javascript comes from; it doesn’t seem to be an open-source plugin.

    The “action” in the admin_ajax.php is “adrotate_impression”. So I guess that if you rotate ads less frequently, or if you come up with a less burdensome way of delivering ads, you’ll solve some of your problems.

    I suspect your rework of your sites changed the way you deliver ads, and that’s why your new sites have performance problems.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer