STRANGE: including wp-blog-header.php takes ~ 15 seconds (4 posts)

  1. cmancre1
    Posted 8 years ago #

    Hi everyone, today I notice that my website was too slow for no reason apparently.
    I did a quick debug and I "found" the first problem.

    Every time I include wp-blog-header.php it taked ~ 15s

    $time1 = time();
    $time2 = time();
    $total = $time2 - $time1;
    error_log("time:$total"); //outputs "time:15"

    What could be wrong? how can i debug this problem?


  2. hakre
    Posted 8 years ago #

    Well a tons of things could have gone wrong because that file quite completely handles/is the full wordpress.

    You already did the first step to debug your problem, you choosed a simple form of code profiling by calculating the execution time.

    Now you only need to find out which part inside /blog/wp-blog-header.php takes such a long time. But before you write error_logging code inside everywhere, take a look at xdebug http://xdebug.org/ it provides a set of open source tools for php code profiling. you can start profiling with xdebug_start_profiling() and at the end you can output an overview with xdebug_dump_function_trace().

    I hope this is helpfull for you.

  3. cmancre1
    Posted 8 years ago #

    problem solved. No wordpress problem. It was DNS problems.


  4. hakre
    Posted 8 years ago #

    nice to read you figured it out cmancre1. Would you please be so kind and mark the thread as resovled? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic