• Resolved willhines

    (@willhines)


    Short version: Looking for performance tips for a high-traffic, high-profile site.

    More details: I’m a web developer working on a web site for usmagazine.com (site of Us Weekly) that’s running on WordPress, based on my recommendation. The staff loved the interface, but high traffic is overwhelming the site. Database errors. There’s other solutions — more powerful server — but WordPress seems to take the heat when I call tech support. I’m trying to save it.

    Any ideas?

    * I’ve installed Wp-cache, but it’s not enough. (Is Staticize a better bet?)
    * Looking into disabling comment counting.
    * There’s no category list or archive list in the sidebar.
    * This is a dedicated virtual server.
    * Traffic ranges from 36,000 to 72,000 sessions a day.
    * MySQL 4.x.
    * Other plugins: Spam Karma, Paged Comment Editing, fl_movie.

    I understand that the problem is high-traffic is beyond optimizing queries and installing plugins. But I’m asking for things like that because those are things I can do in the next few days.

    Lots of good ideas in these forums. An amazing community! WordPress rules. Thanks for any advice.

    ——–
    Errors:

    WordPress database error: [Can’t create/write to file ‘/tmp/#sql_16d8_0.MYD’ (Errcode: 17)]
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= ‘2006-04-26 04:29:59’ AND (post_status = “publish” OR post_author = 2 AND post_status != ‘draft’ AND post_status != ‘static’) AND post_status != “attachment” GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 10

    Odd side effect: I was mailed a backup of the database about 45 times before I disabled the backup and wp-cron plugin.

Viewing 15 replies - 31 through 45 (of 51 total)
  • This might be inconsequential, but is the fact the site’s running 2.0.1 a factor?

    Speaking of images, as an example there’s a photo of Keira Knightley on the homepage (55382117.jpg). The image filesize is about 100Kb. Without any discernable loss of quality I was able to reduce this to 30Kb with the same image dimensions (on my machine).

    For that amount of bandwidth running on a VPS is a stuipid idea.

    Firstly you would probably need two servers, one dedicated MySQL and one dedicated Apache webserver. You will need a lot of ram, even with any other CMS anything less than 2GB ram for that number of visits per day and your server is going to burn!

    Also Email should have its own dedicated server, I made that mistake a while back, great thing is for me with only 20 or so email users I was able to set up the box easily.

    The Webhost should have offered you better hosting instead of blaming your choice of software. Your their customer and they have a duty to serve you, not boss you around!

    Get a dedicated server on a good webhost, you should see an improvement in service then. Its not the software its a hardware issue.

    I tried to say more or less the same thing earlier carbontwelve, but you’ve outlined it better. Trying to shoehorn a large and busy commercial site into a VPS is a challenge at best. I’m sure it could be somewhat improved with the various performance enhancements discussed, but it’s still a bus trying to be a beamer. He wouldn’t need a monster server, but I’d still recommend he get the best his budget allowed. Unless he doesn’t expect to grow in populatity.

    Thread Starter willhines

    (@willhines)

    Thanks for all the advice, everyone. I will be better prepared the next time I try to install WP on a highly-trafficked site, and I’m sure I will try again.

    I think the front page was not caching because of comment counts changing. I’ve turned comments off and the front page seems to cache.

    For many of these changes — trying lightttpd, more RAM, analyzing queries, determining if big images are a factor — you need your ISP to be on board. I wasn’t successful in getting them on board.

    [edited to add]: angsuman, that’s a handy change for wp-cache to prevent regeneration with every new comment. Very cool. If someone does that, they should probably add a message telling the person posting that their comment won’t show up right away, or else people will post repeatedly.

    Thanks again for all the advice. It will be a big help on my next attempt.

    Will, can you please furnish your current VPS specs, as it’ll help us a lot when similar issues (or questions of need) come up in the future? Thanks!

    -d

    Thread Starter willhines

    (@willhines)

    I can’t find a useful spec. It (was/is) a mediatemple DV-Extreme plan. Can’t find the specs you need. Here’s what their site has about the hardware:

    HP ProLiant DL360 G4s, featuring dual 3.0 GHz Xeon Processors and RAID-1 SCSI drives.
    1 gig ram, 18 gig hard drive storage, 500 gig bandwidth (we had purchased an addition 500 gig on top of that).
    Red Hat Enterprise Linux 3 with PHP 4.3.2

    Not the numbers you’re looking for, I know.

    Ummm, actually that’s some of the numbers. HOLY CRAP. That’s a lot of server.

    Though, they don’t say what cpu min/max you actually get (i.e., how they load up the server) — and whether they have overcommitted resources (which happens a lot with VPSes…).

    1GB of ram should be decent — I think people here have been trying to squeeze into 256MB or 384MB accounts.

    Then again, given the price, you could easily have a dedicated box.

    My suggestions remain true even if you move to another ‘blog program’:
    – you have GOT to shrink your images. my guess is you could shrink 50% easily, maybe up to 60-65% average over all of them.
    – you probably want to look at lighttpd and other fast content servers. serving up images will be greatly enhanced (which if you want to keep apache in the mix will keep it from being crushed by image requests…).
    – you will still need to look at overall configuration and balancing, if you have heavy spikes of traffic and comments. a ‘static based’ system will STILL have to regenerate content when things change! it is just that it serves the content as vanilla html rather than spawning php and having php do a little processing to hand you back a cached page.

    Best of luck!

    -d

    I hope MT will be the solution to your problems; although it looks like your performance issues are hardware related.

    I thought this bit of info would put things into perspective. These guys run MT on high-traffic sites and it sounds like they have server load issues as well.

    https://www.nickdenton.org/002191.html

    found this link on a site that was previously mentioned in comments. Dunno if it it could help how to improve performance on heavily commented blogs

    I don’t think that (really short) article is of any use compared to the discussion here. WP-Cache has been extensively discussed, any major site with comment traffic NEEDS comments content to be ‘live’, updating more frequently than the average cache refresh (of hours…)

    Frankly, the other topics of content optimization (images which should be shaved to 50% or less of current sizes!), general memory use, apache optimizations, Mysql’s query cache, mysql optimizations, things like APC, memcached, other php opcode caches, etc., are what’s really key to the discussion of tuning performance of really high use sites. And, again, alternate webservers like lighttpd/thttpd (on the free side…) which can be much faster than apache on static content serving, where we’ve been discussing a site with huge bandwidth of static images…

    and, just imho, not very ‘supportive’ to say “I’ll post over on my blog a suggestion, everyone go there to see it.” it was a one-line change that could have been discussed in the thread.. (and again all it does is disable comment posting from refreshing the cache, which as I said would be detrimental to the type of ‘live’ site being run…).

    -d

    Thread Starter willhines

    (@willhines)

    Thanks to everyone for the suggestions.

    I’ve tried to talk to the blog authors about reducing image sizes, David, so I hope I can get that to happen. They’re not too savvy, but hopefully I can make it happen.

    I think the main lesson I’ve learned is that you can only go where your server admin (be it yourself or an ISP) wants to go.

    My ISP (or the people my boss talked to), for reasons I do not know, thinks that WP is not worth the trouble and that MT is easier. The only real diffrence will be that MT was THEIR idea and I assume they will put the legwork into making it work.

    Most frustrating: I laid out my plan for the site with my ISP before we launched at the start of March, including WordPress. The guy I talked to then approved of the choices.

    But once the traffic slammed us — it got bumped to a higher manager, who blamed the one component that the ISP did not specifically install, WordPress. Classic “not my problem” problem solving. WordPress? I didn’t install that — so it must be the problem.

    To be fair, they took SOME steps: increased clients in apache, and shortened the session time. One guy suggested WP-Cache, which I installed. But how about isolating some SQL queries? Increasing RAM? Moving to a dedicated box? Checking that we’d maximized the use of the caching plugin? Nope. Suddenly, flat HTML was the only solution.

    Know your ISP. Get them on board with your plan. Or be your own sys admin.

    A few years ago I began managing my own servers for reasons just like this. I was quite frustrated with the problems I had when relying on someone else for support, even when they had the best of intentions. I finally had some relief when I took on the server management for the sites I design.

    and btw, wordpress doesn’t cause a blip on my servers. (no, not as busy as yours) But I’ll tell you what does. Mail. With all the filtering and processing you now need to email, my server load picks up because of it. I’d ask your IT dudes if email is being processed on this server. And if true, I ask they stop doing that.

    I just went through the same issues just last week.

    Dedicated server is the only solution for you.

    Also, if you get around 400+ comments a day & you want to display comment activity, make sure you grab this:
    https://freepressblog.org/wordpress-plugins/recent-comments-plugin/

    I’ve literally tried out every other plugin & they all crashed the web server, but for some odd reason, this plugin handles high loads wonderful (high loads around 180k daily pageviews w/ around 500-700 comments/day)

    godspeed!

    While I realise it’s not particularly relevant in this case, I thought I might throw this out there in case it’s useful for someone else.

    Previously, I’ve had server load issues with a different PHP app (Beehive forums) which was hammering the server into the ground. The same server also runs a few WordPress sites. At one point, the last thing I got out of the server was a ‘cat /proc/loadavg’ which returned an answer of ‘431’.

    After installing Turck-mmcache, the server easily handled the load, and the wordpress sites seemed significantly more responsive. Load now sits under 1 most of the time. The box is a 1.7GHz celeron with 512 meg of ram, and IDE disk.

Viewing 15 replies - 31 through 45 (of 51 total)
  • The topic ‘high traffic crashing usmagazine.com’ is closed to new replies.