WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Update a post and blam.. every pageload is 20 seconds (15 posts)

  1. petercooper
    Member
    Posted 7 years ago #

    Fresh install of WordPress 2.1.1 on a local server with no traffic. Apache 2, MySQL 5, PHP 5, etc.. everything works very fast. WordPress works extremely quickly until you edit a post then save it. That save then takes 20 seconds, and EVERY single pageload to the admin system or blog itself takes 20.xx seconds.

    The only cure is to wipe the database and rerun install.php and start anew. Then it's all fast again until you update any post (creating new ones doesn't cause the problem).

    There appears to be no CPU usage during this delay. And other directories containing other PHP scripts continue to work rapidly whatever's going on.. so it's a WordPress related issue.

    Any thoughts? This is really odd.

  2. petercooper
    Member
    Posted 7 years ago #

    Also, all plugins are deactivated, and there's no ping outgoing (there was, but I removed it and pages still take 20 seconds).

    No errors in the Apache error logs. Restarting Apache has no effect. Restarting machine has no effect. Restarting MySQL has no effect, and SHOW FULL PROCESSLIST shows no slow SQL, etc.

    Seems even the barebones login page now takes 20 seconds to load. Again, everything else on this host is fast (including PHP).

  3. petercooper
    Member
    Posted 7 years ago #

    Exporting then deleting the database, running install.php, and then importing the database again.. and it's super fast again. All I then do is merely edit a post, click Save, and bam.. it's 20 seconds for every page again.

    Hopefully this is a big clue :)

  4. petercooper
    Member
    Posted 7 years ago #

    I've erased the whole thing and moved down to 2.1. Same bug. Then I erased it all again and moved down to 2.0. 2.0 doesn't have the bug. It seems to take exactly 20 seconds to save a post, but then it works and every page loads fast otherwise. So.. it's a 2.1 problem.

  5. Chris_K
    Member
    Posted 7 years ago #

    Be helpful to list the exact versions of PHP and MySQL if you can?

  6. petercooper
    Member
    Posted 7 years ago #

    Sorry for posting so much but I'm hoping this helps someone who gets the same problem as me..

    Further info.. it seems it might be DNS related. I've added an entry to /etc/hosts on the server with the server's hostname and the IP address, and the 20 second wait goes away.

  7. petercooper
    Member
    Posted 7 years ago #

    Final update.. I put 2.1 back on again, and it works okay now that the virtual host name I am using resolves from the server in question.

    I don't know why this problem exists more with 2.1 than 2.0, but performing a post update must trigger 2.1 to try and resolve the virtual host's hostname on every request thereafter.

    So.. make sure all your virtual hosts resolve from the server, and not just from your test client ;-) Weird bug, but I know someone else will have it sometime!

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    peter: WordPress tries to make http connections back to itself for the cron process. Adding a post is one of the things that will cause this to be triggered on the next page load. If it cannot resolve its own name, then it cannot connect back to itself to start the cron process.

  9. petercooper
    Member
    Posted 7 years ago #

    Useful information, Otto!

    It seems then that 2.1 does this on every request, or at least tracks it needs to still do it at next request (if it fails).. whereas 2.0 only does it on posting. :)

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Yes, on every request, it checks to see if there are any cron jobs that have had their scheduled time earlier than the current time. If so, it attempts to make that http call to the cron process, which will then run those jobs and remove them from the queue.

    Making a post inserts a new job with an immediate expiration time, so that the next hit to the page will cause the job to run.

  11. rtatum
    Member
    Posted 7 years ago #

    This post worries me because my ISP has been shutting me down due to excessive cron utilization, stating that something has been running a cron job every two seconds:

    I was sent the following as an example:

    67.15.211.3 - - [28/Feb/2007:11:13:35 -0600] "GET /blog/wp-cron.php?check=131accfed8363d4c40f4b38b43f9d129 HTTP/1.0" 403 - "-" "-"
    67.15.211.3 - - [28/Feb/2007:11:13:37 -0600] "GET /blog/wp-cron.php?check=131accfed8363d4c40f4b38b43f9d129 HTTP/1.0" 403 - "-" "-"
    67.15.211.3 - - [28/Feb/2007:11:13:44 -0600] "GET /blog/wp-cron.php?check=131accfed8363d4c40f4b38b43f9d129 HTTP/1.0" 403 - "-" "-"
    67.15.211.3 - - [28/Feb/2007:11:14:06 -0600] "GET /blog/wp-cron.php?check=131accfed8363d4c40f4b38b43f9d129 HTTP/1.0" 403 - "-" "-"
    67.15.211.3 - - [28/Feb/2007:11:14:13 -0600] "GET /blog/wp-cron.php?check=131accfed8363d4c40f4b38b43f9d129 HTTP/1.0" 403 - "-" "-"

    Is there any way to view current cron jobs in queue? Is there any way to control this? It looks like, from the above, that the cron job that is being requested isn't being processed.

    Rich.

  12. Tittentei
    Member
    Posted 7 years ago #

    Right now it takes several minutes to load dashboard&blog
    http://www.preikestolengolf.no/blog/wordpress ....

  13. audihertz
    Member
    Posted 6 years ago #

    Further info.. it seems it might be DNS related. I've added an entry to /etc/hosts on the server with the server's hostname and the IP address, and the 20 second wait goes away.

    Just wanted to add that I used this on an Apache server and it seemed to really help out. The pages loaded slow, but it's not on the fastest connection. This WP install is on a server that I setup myself, and it also runs a couple of Drupal installs as well. Seemed to do the trick for now.

  14. fuocorav
    Member
    Posted 6 years ago #

    How do I configure it properly for litespeed server?

  15. xbrain
    Member
    Posted 6 years ago #

    Further info.. it seems it might be DNS related. I've added an entry to /etc/hosts on the server with the server's hostname and the IP address, and the 20 second wait goes away.

    how to add those hostname and ip address on the etc/hosts form the whm contro panel?

Topic Closed

This topic has been closed to new replies.

About this Topic