ThemeShaper Forums » Thematic


How are Thematic DB Queries? Are they Optimal?

(15 posts)
  • Started 8 years ago by rekopacz
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. rekopacz

    I have a client who is not using Thematic, but a free theme that someone hacked into shape for him (and didn't do the best job, IMHO). He has 100,000s of page views per month. He recently moved the site to a VPS, and they are constantly having to reboot the server for him, as it stopped responding due to an "Out of memory" error. They explain that he needs to "either . . . optimize scripts and mysql queries under this vps to avoid further stability issues" or buy more memory. Since he already has a lot of memory, I am thinking his theme and the queries therein might be an issue.

    Question: Are the scripts and queries in Thematic considered "optimal" in this regard? If he switches to a Thematic-based theme, is there a chance that the scripts would be considered "optimal" in this context, meaning that he truly needs to buy more memory? I looked around the forum, and couldn't find anything on this. Likewise googled the issue, and it seems to be a common problem, so I don't know if its because of an inherent WP issue, or a theme-based issue?

    You Thematic ninjas out there, thanks in advance for any help.

    Posted 8 years ago #
  2. self-proclaimed ninja... but not a jedi. never heard of that problem w/ thematic specifically and it is a bit out of my range anyway. my immediate thought is that if he's got that much of a load from page views then you should be looking at reducing the number of styles and scripts loaded, minifying said scripts (like with better wordpress minify), and most important doing some kind of caching. there are some solid caching plugins for WP, such as wp super cache and w3c total cache.

    Posted 8 years ago #
  3. Could you please provide some more details about the VPS, memory, plugins and so on?

    I created a lot of additional code for high volume web sites and never run into these problems.

    It could be the theme, but I'm pretty sure that something else is causing your problems.


    Posted 8 years ago #
  4. hi chris! wow rekopacz, you asked and you got a reply from one of the head thematic jedis!

    Posted 8 years ago #
  5. rekopacz

    Thank you Chris and helgatheviking! I am humbled and appreciative //bows deeply from the waist//. Please let me finish one site I am getting out on a short deadline, Chris, and I will post the details later this evening.

    Thanks again for the rapid response!

    Posted 8 years ago #
  6. rekopacz

    Okay here goes:

    26 active plugins in all (five inactive)

    Advanced TinyMCE config
    All in one SEO Pack
    cforms II
    Digg Digg
    Google Analytics for Wordpress
    Google XML sitemaps
    JJ NextGen jQuery cycle
    LiveFyre realtime comments
    Mailing list
    Maintenance Mode
    NextGen Gallery
    Page View
    SEO Rank Reporter
    SinglePost Template
    Slidedeck Pro for Wordpress
    Slidedeck Pro for Wordpress slider widget
    TinyMCE Advanced
    Wordpress file monitor
    WP Carousel
    WP Minify
    WP Super Cache

    I am getting info on the server, but the RAM is in excess of one gigabyte, I believe.

    The site received a several hundred thousand page views in the last month, averaging a few thousand a day.

    There are admittedly a lot of plugins, each pulling a different script and style sheet into the mix. The site also relies on many images, particularly on the front page, which are hosted on the server. Eight posts on the front page, each with an image 550 x 420, then a cycling slideshow of eight images (each 972 x 133) in the header, and two more images stacked above that slideshow (each having same width and same approximate height as the images in the cycling slideshow.

    As I write this, I sense that the images might be an issue, but again, I am not sure.

    Let me know if you need more, and thank you for any feedback you can provide.

    ADDENDUM -- I am trying to get a sense of how much of an impact a poorly written theme can have on the performance of the site, and if so, if Thematic could incrementally improve the performance.

    I am also considering hosting the images separately, although this might be cumbersome (can the WP media uploader be configured to upload images to an outside server? Not a question for this forum, though, more general to WP.

    Posted 8 years ago #
  7. Except of the number of plugins, there's nothing really special.

    Could you please add this code to the footer.php:

    <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.

    and give me the URL for this web site or send it over to chris_mobil (at) wupperpiraten (dot) de.

    Back to the 'out of memory' .. is this an system error on the server?

    Seems to be something nasty. A couple of thousand hits per day is not that much ;)

    Posted 8 years ago #
  8. Try the code on your local copy first :)

    Posted 8 years ago #
  9. rekopacz

    OK, Chris, just sent you the URL and the "Wunder Kod" in the footer. :-)! Thanks in advance for any advice.

    BTW that's a cool little piece of PHP-work. Will save that for future reference.

    Posted 8 years ago #
  10. Hi Rekopacz -

    First, a big welcome back to Chris... good to see you again.

    Rekopacz, my company has a lot of experience with different hosts, and we manage 3 different VPS installations plus two cloud sites, all using WordPress and Thematic. Chris is helping you ferret out specific database calls involving Thematic, so I will concentrate on some topics and tactics that are otherwise related:

    • In my experience, many hosts like to blame WordPress, and a particular installation of same when it could be related to how they are managing their VPS systems. To check this, you could install a free monitoring software on your VPS -- we use cPanel/WHM a lot and Munin is a free plugin that will keep your host on their toes (send screenshots showing performance issues and spikes to them and ask for explanations)
    • Minimize plugins. Chris alluded to this, but I can't stress enough that some are poorly written and can cause conflicts
    • Take a hard look at W3 Total Cache... it performs very well and we moved to it exclusively after reading comparison reviews with Super Cache. A big advantage is that you will be able to deactivate minify... as it has this ability built in, and so reduce the plugin load. See:
    • Related to the first point, there are often other "processes" running on VPS and dedicated servers. I can't tell you a lot more about them because I am not a Linux engineer, but I can tell you this -- paying someone knowledgeable to review and recommend which processes are not necessary (ie. cPanel loads some server level stuff you can get by without like list servers, etc.), and shut them down helps big time. We use a service called Server Surgeon for this -- and there are others
    • Consider an off site forms processor like, or perhaps MailChimp. I love the cForms plugin, but there are some good arguments to offloading this functionality including streamlining the VPS performance, and also if you/client have a CRM like SalesForce or perhaps BatchBook, you can embed one of their forms and stay more efficiently organized

    Good luck. I am sure Chris will also direct you to the functions.php file of your theme -- there could be some stuff causing you problems going on there too. The above list was won in the trenches with a lot of hard knocks to the head, so here's to saving you some of the same.

    Cheers -

    Posted 8 years ago #
  11. Kathy & Scott: Thanks for the welcome :) .. thought this would be a case for the Jedis ;)

    Scott, you are right with the plugins. Part of the problem is caused by the slider plugins. Nice thing for small web sites and a killer for high volume sites. I always hard coded the sliders including pictures into the theme files or created customer specific and highly optimized slider plugins.

    rekopacz, I send you a few things that should be changed in the existing theme.

    Posted 8 years ago #
  12. rekopacz

    The Thematic team has once again demonstrated its true Jedi status :). I am going to discuss this with the client and will let you know what happens, but it has been interesting seeing the limits / abilities of these CMSs against a high volume site, not to mention thinking of solutions. Unfortunately, I am merely a young Skywalker here. Wish I could offer something in return, except my undying commitment to Thematic.

    I will be trying to incorporate a responsive framework into Thematic (following an existing thread here to help me along), if I can contribute in some way to that project let me know.

    Again, my thanks for the Jedi wisdom. May the Loop be with you.

    Posted 8 years ago #
  13. rekopacz - i took a stab at some adaptive layouts a long time ago:

    they probably should be tweaked so that they are mobile first. let me know if you come up w/ anything interesting. or fork me.

    also, if you wanted to help thematic out right now i am trying to test thematic out against the current WP theme review checklist. if you could tackle a section of the checklist that could be very helpful.

    Posted 8 years ago #
  14. rekopacz

    Yikes! So sorry helagtheviking, I got pulled away by some personal issues and just saw this. And yes YES! I would be most honored to help with Thematic out against that checklist. I hope its not to late :-o! Tell me what I need to do, and where I need to report the results of what I do. Most happy to help in any way I can.

    I did see a thread from you in the forums on the responsive stuff. I will be looking into it more closely and yes, if I can contribute that as well, I would be delighted. "responsive" seems to be the buzzword for this year.

    I thank everybody again for the feedback on the client site. He continues to have problems but your feedback has given me perspective. I would like him to redesign so the theme isn't so "hackish" and will also incorporate the thoughts and suggestions here. You are all true Jedi. :-)!

    Posted 8 years ago #
  15. no problems. i think i've made it through most of the checklist, but you can check out our issues on google code:

    i think this is going to be the biggest one:

    but just in general another set of eyes on the WP test content would be good. if you know anything about localization or the settings API i'm sure we could use help there too.

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.