• Resolved Moto_

    (@moto_)


    Hi everyone,

    Since i’ve update WP to 4.1 i’m experiencing a slow loading WP-Admin. It’s also effecting the overal speed of the website, ajax-admin cause load times from 2,5 up to 15 seconds sometimes.

    Updated to 4.1.1 but didn’t resolve the issue.
    When downgrading WP 4.1 to 4.0 the issue is gone.

    I’ve read various threads about the WP Heartbeat API, and tried the Heartbeat Control Plugin, with no difference in loading times unfortunately.

    Is this a known issue and is there a solution?

    Pingdom Test

Viewing 8 replies - 1 through 8 (of 8 total)
  • I looked at your Pingdom test results and your site. I see you are using a caching plugin. When the front-end is fast using a caching plugin but the admin area is slow, that usually indicated an overloaded web server (as the resource requirement to serve the cached HTML is low).

    If you turn off the caching plugin, is the front-end slow as well? If so, your server is probably overloaded. If you need more information about how to determine if your server is overloaded, just let me know. It could be a networking problem, but those usually do not last too long. So if it is a problem lasting days, odds are the server is overloaded.

    Thread Starter Moto_

    (@moto_)

    Thanks, Cheesedude! Well understandable explanation.

    I’m using the W3 cache plugin and some cache rules in my .htacces. I’ll test the site without it and see what happens.

    I’ll let you know how it turns out, thanks again.

    Thread Starter Moto_

    (@moto_)

    When turning the caching plugin off, the front-page is still fast enough. So i don’t think i’m overloading the server or something. I’ve checked my usage and error log but there a no issues.

    But the admin ajax takes now less time to load, tested like 10 times and it’s usually about 1,3/1.5 seconds.

    Although there are still moments the admin-ajax takes 3,4 or more seconds to load. But not as often anymore. When searching on this issue i stumbled across several threads about it where they are experiencing this since the update to 4.1.

    But i’m happy, it’s faster and takes less time to load. So thanks for your help!

    Test your site with tools.pingdom.com and see what that shows. Also, if you want to be *sure* your server is not overloaded, check it with this little script. You should want to know if it is overloaded, at least during peak times. It will only take you a minute to check. Just copy the code below and stick it in a PHP file and run it by navigating to it with your browser:

    <!doctype HTML>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>CPU Load Averages & CPU Info</title>
    </head>
    <body>
    <h1>Server Load Averages & CPU Info</h1>
    <h2>Server Load Average</h2>
    <?php
    
    //  Check to see if sys_getloadavg function exists.  If so, run it to get system load averages.
    if (function_exists('sys_getloadavg'))
    {
      if ($arr_load_avg = sys_getloadavg())
      {
        echo '<div>';
        echo '1 minute: ', $arr_load_avg[0], '<br>';
        echo '5 minute: ', $arr_load_avg[1], '<br>';
        echo '15 minute: ', $arr_load_avg[2], '<br>';
        echo '</div>';
      }
      else
      {
         echo '<p>Could not get load averages.</p>';
      }
    }
    else
    {
      echo 'Could not get load averages.  sys_getloadavg() function may have been disabled.';
    }
    
    echo '<h2>CPU Info</h2>';
    
    //  Run a system command to retrieve CPU info.  Check to see if exec function exists first.  It may be disabled for security 
    
    purposes.
    if (function_exists('exec'))
    {
      if (exec('lscpu', $cpu_info))
      {
        echo '<pre>';
        foreach ($cpu_info as $key => $val)
        {
            echo $val . "\
    ";
        }
        echo '</pre>';
      }
      else
      {
        echo '<p>Could not get CPU info.</p>';
      }
    }
    else
    {
        echo '<p>Could not retrieve CPU info.  exec() function may have been disabled.</p>';
    }
    
    ?>
    </body>
    </html>
    Thread Starter Moto_

    (@moto_)

    Hi Cheesedude,

    Thanks again.
    But when trying to run the php file, it gives me the following error.

    Parse error: syntax error, unexpected T_IF in /home/multinp148/domains/mijnautosleutel.nl/public_html/TEST.php on line 38

    *By the way, since i’ve deactivated the W3 plugin yesterday the admin-ajax takes now about 1/1,5 seconds to load. (Tested multiple times with Pingdom) so that’s a lot better now.

    Thread Starter Moto_

    (@moto_)

    I’ve contacted my webhoster and they didn’t see anything causing an overload on the server.

    Hi, Moto_. Peak internet traffic is usually Monday through Friday during late afternoon to early evening in America. That is when server loads tend to be the highest.

    Your 1 – 1.5 second load time is good. If you notice any problems during peak internet traffic, then you can consider the load again. For whatever reason, an error was made in copying and pasting the little script I posted earlier. I fixed it and tested it. It works fine on my host. Some hosts disable system functions, and if they do this won’t work. But here is the little script again in case anyone reading this has problems with slow loading and suspects a server load issue.

    <!doctype HTML>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>CPU Load Averages & CPU Info</title>
    </head>
    <body>
    <h1>Server Load Averages & CPU Info</h1>
    <h2>Server Load Average</h2>
    <?php
    //  Check to see if sys_getloadavg function exists.  If so, run it to
    // get system load averages.
    //
    if (function_exists('sys_getloadavg'))
    {
      if ($arr_load_avg = sys_getloadavg())
      {
        echo '<div>';
        echo '1 minute: ', $arr_load_avg[0], '<br>';
        echo '5 minute: ', $arr_load_avg[1], '<br>';
        echo '15 minute: ', $arr_load_avg[2], '<br>';
        echo '</div>';
      }
      else
      {
         echo '<p>Could not get load averages.</p>';
      }
    }
    else
    {
      echo 'Could not get load averages.  sys_getloadavg() function may have been disabled.';
    }
    
    echo '<h2>CPU Info</h2>';
    
    //  Run a system command to retrieve CPU info.  Check to see if exec
    // function exists first.  It may be disabled for security purposes.
    //
    
    if (function_exists('exec'))
    {
      if (exec('lscpu', $cpu_info))
      {
        echo '<pre>';
        foreach ($cpu_info as $key => $val)
        {
            echo $val . "\n";
        }
        echo '</pre>';
      }
      else
      {
        echo '<p>Could not get CPU info.</p>';
      }
    }
    else
    {
        echo '<p>Could not retrieve CPU info.  exec() function may have been disabled.</p>';
    }
    
    ?>
    
    </body>
    </html>

    A load average of 1 per core is generally considered acceptable. If your server has 2 CPUs with 4 cores each, that’s a total of 8 cores so a load average of 8 or less would be acceptable.

    Thread Starter Moto_

    (@moto_)

    Yes, tested my website last day and the load time is far more consistent then before.

    Thanks again, and maybe someone else find this info usefull indeed.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP 4.1 and slow loading WP-Admin’ is closed to new replies.