SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Location
    RomĂ*ns D'Isonzo, Friuli-Venezia Giulia, Italy, It
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unbelievable CPU load when logging into wordpress and editing posts

    I have a Wordpress blog at www.fotocomefare.com, hosted on bluehost, Wordpress version 3.3.1.
    I'm experiencing an annoying problem. In some cases CPU throttling, as reported by Bluehost jumps to over 3600 seconds per hour.
    Obviously, this isn't possible and the support told me that it must be some wrong plugin. I have several plugins, and most of them cannot be disabled for testing purposes, so as not to disrupt user experience.

    I noticed that the problem appears mostly when I am editing posts and pages. Sometimes, throttling engages simply because I just did login.
    So, I suspect it is something related to the dashboard or only to logged in users.

    Do you know a way to correctly diagnose the problem?

  2. #2
    Non-Member
    Join Date
    Mar 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in google search as word press optimization guide, I guess this search should resolve the issue

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Location
    RomĂ*ns D'Isonzo, Friuli-Venezia Giulia, Italy, It
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Annaflax View Post
    in google search as word press optimization guide, I guess this search should resolve the issue
    Well, I already did similar searches a number of times.
    As you can see if you read about WP optimization, tutorials and guides always regard almost only the optimization of loading time, not the response time.
    When a site is throttled, it means that it is using too much of the cpu on the shared server. Usually, on a Wordpress site, it is due to bad plugins and/or too long queries.
    With regard to this problem, the tips I always found only suggest to disable all plugins and try reactivating them one at a time. However, for many of the plugins I'm using I'd prefer not doing that, since it would ruin user experience.
    So my question was about how to identify potential causes of heavy cpu usage and not how to optimize loading time.

  4. #4
    SitePoint Guru bronze trophy Slackr's Avatar
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    679
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I'm assuming that you've talked to Bluehost already about this? Often they can see what is happening server-side which may not be showing up in the logs and error reports available to you.

  5. #5
    SitePoint Member
    Join Date
    Apr 2012
    Location
    RomĂ*ns D'Isonzo, Friuli-Venezia Giulia, Italy, It
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Slackr View Post
    I'm assuming that you've talked to Bluehost already about this? Often they can see what is happening server-side which may not be showing up in the logs and error reports available to you.
    Yes, I talked to them more than once about this, but they couldn't help me.

  6. #6
    SitePoint Member
    Join Date
    Apr 2012
    Location
    surat,india
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check Your Ping setting going setting--> Writing.check removing ping sites It may possible some ping site has timeout and takes to much time when you edit post.I have problem with them with my recent WordPress site <snip/>
    Last edited by Mittineague; Apr 28, 2012 at 11:27. Reason: removing unnecessary link

  7. #7
    SitePoint Member
    Join Date
    Apr 2012
    Location
    RomĂ*ns D'Isonzo, Friuli-Venezia Giulia, Italy, It
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, does it ping also when you edit a draft. Isn't ping made only after publishing?

  8. #8
    SitePoint Member
    Join Date
    Apr 2012
    Location
    surat,india
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No editing and save as draft is not ping any request.

  9. #9
    SitePoint Member
    Join Date
    Apr 2012
    Location
    RomĂ*ns D'Isonzo, Friuli-Venezia Giulia, Italy, It
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And what about the spike in cpu load at login?
    It happens around once per day, but not every time I log in. What is executed by Wordpress at login?

  10. #10
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Do you have a lot of "cron" going on? WordPress doesn't do "real" cron, but performs such tasks when certain things are first accessed after a given time period. It sounds like you have some admin cron happening.

    Try scanning your files for "wp_schedule_event"

  11. #11
    SitePoint Member
    Join Date
    Apr 2012
    Location
    RomĂ*ns D'Isonzo, Friuli-Venezia Giulia, Italy, It
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was only starting to suspect something about cron. These are the scheduled events in cron:

    w3_dbcache_cleanup
    w3_objectcache_cleanup
    polls_cron
    w3_pgcache_cleanup
    wp_version_check
    wp_update_plugins
    wp_update_themes
    wp_scheduled_delete
    akismet_scheduled_delete
    wpp_cache_event
    w3_minify_cleanup
    dbmanager_cron_backup
    dbmanager_cron_optimize
    dbmanager_cron_repair

    As you can see, there is nothing so strange. And, more importantly, there is almost nothing I can remove, since most of the events are related to w3tc, dbmanager, or wp itself.

  12. #12
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    If you need them. you need them. But hopefully you can stagger their execution to spread the resource use out. i.e.
    wp_schedule_event($timestamp, $recurrence, $hook, $args);

    Can you change the $timestamp values? If they're all "midnight" having each - or at least the heavy hitter - separate should help.
    And maybe you can reduce the recurrence values? Not sure if that would help much, it might just pile things up unless there's a lot of redundancy.

  13. #13
    SitePoint Member
    Join Date
    Apr 2012
    Location
    RomĂ*ns D'Isonzo, Friuli-Venezia Giulia, Italy, It
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, wise advice.
    My biggest problem is that they are all scheduled by plugins or by wordpress itself, so I'd have to change their source code.
    Fortunately, I can write code, but every time I will update I'd have to redo the modifications.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •