ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Site hanging

February 16, 2011 1:59pm

Subscribe [5]
  • #16 / Feb 19, 2011 2:33pm

    Greg Salt

    3988 posts

    Hi bthom62,

    You don’t need to worry about your divs or weblog:entries tags at the moment. Please just put the variable at the bottom of your template right before your closing body tag like this:

    Total Queries: {total_queries}
    </body>

    Then just view the front end of your site and refresh the page. You should be able to see the total SQL queries that your template generates and once you’ve made a note of it you can remove that code. Please post the resulting total here.

    Cheers

    Greg

  • #17 / Feb 19, 2011 5:36pm

    bthom62

    164 posts

    198

    thank you

  • #18 / Feb 21, 2011 3:39am

    John Henry Donovan

    12339 posts

    bthom62,

    that is quite a lot of queries for your homepage.

    Can you confirm what type of variable {disable_most} is please?

    Can you tell us what your Database Connection Type is under your Database Settings?

    You said you haven’t seen the issue since. Is that still the case?

    I have 17 such entries on my front page

    Is American Politics, Life, Freedom a primary category with 4|105|117|15 as sub categories or just a title you gave that group of categories?

    This is something that you would probably need to bring to the CodeShare corner as it is more of a how-to question

  • #19 / Feb 21, 2011 10:50am

    bthom62

    164 posts

    Guess What ????

    Same time as always, Engine hosting says it is not them


    Our site hanged with locked processes

  • #20 / Feb 21, 2011 11:08am

    bthom62

    164 posts

    Engine hosting mentioned something about

    ‘last_activity’

    “If you set the ‘last_activity’ into the future, you will not have so many UPDATE queries and will eliminate the locking queries as part of the problem.”

    Does anyone know what this is?

  • #21 / Feb 22, 2011 2:05am

    John Henry Donovan

    12339 posts

    bthom62,

    Could you answer the questions I have asked please?

    ‘last_activity’ if you search the EE docs brings you to our page related to handling extreme traffic here You can read up on the query mentioned there.

    To be honest like we have said, I believe it to be how your templates have been set-up. It might be worth engaging a professional from the Pro Network to work with you on these to make them as efficient as possible

  • #22 / Feb 22, 2011 7:20am

    bthom62

    164 posts

    I have been there with engine hosting and done alot of those steps

    They had me enter a manual code into the database

    But this still comes no where near any of issues

    1. Have used the same code since september 2007 with no issue
    2. have run it with a heck of a lot more traffic on my site with no issues
    3. Problem started around when I was updated to the commercial version (around the same time)
    4. Been having issues since around July-August 2010. Not every day, but in fits and starts.
    5. But always around the same time of the day


    this is part of my last note from engine hosting

    I can get you access to the raw server logs if you would like.

    This looks to be a problem with traffic.  Please read this document http://ellislab.com/expressionengine/user-guide/general/handling_extreme_traffic.html

    Especially note this section:
    ————————————————————————————————————————————————————————————————————————————————————————————
    Lastly, if you have a membership based site and have a sudden and tremendous influx of traffic of members who have not visited your site in a number of hours, the update of their last activity may cause a table lock. If you find this to be the case, you can have the server administrator run the following query after killing the locks, to delay the individual updates for members until a later time, perhaps when traffic is less tense. The example below pushes this off for another 20 hours (72000 seconds).
    UPDATE exp_members SET last_activity = (UNIX_TIMESTAMP() + 72000)

  • #23 / Feb 22, 2011 5:41pm

    Ingmar

    29245 posts

    It looks like you are getting a lot of additional traffic, yes. Have you tried some of the solutions suggested in Handling Extreme Traffic?

  • #24 / Feb 22, 2011 9:42pm

    bthom62

    164 posts

    Ingrid:

    My site is hanging, when I am having 20-30% less traffic than my peak (April-may- June of last year)

    When I have had more traffic I never had the site hang

    I have gone here:
    http://ellislab.com/expressionengine/user-guide/general/handling_extreme_traffic.html

    I have no caching set up on the site as per Engine Hosting

    I have set up the preferences as per the above link

    I have manually updated the mysql with the following code:
    UPDATE exp_members SET last_activity = (UNIX_TIMESTAMP() + 72000)

    If it was about traffic it would happen all the time not at almost clockwork like precision

    It appears everyone is scratching at the surface.

  • #25 / Feb 23, 2011 10:49am

    Sue Crocker

    26054 posts

    disable_most is a global variable for:

    member_data|trackbacks|pagination|category_fields

    If it’s happening at a particular time, is there anything you’re doing at that time? You only have members that you use to assign to entries, they don’t actually ever login do they?

    Can we have you edit your config.php to put those other items into play?

  • #26 / Feb 23, 2011 11:12am

    bthom62

    164 posts

    Happening at a particular time?  yes

    Am I doing anything extra or different at that time? No

    Members?  They do not log in ever, or post. All posts done by two super admins

    Config.php? Can I change that through the admin control panel? If so I have already done that

    Enable Online User Tracking?
      Yes   No   
    Enable Template Hit Tracking?
      Yes   No  
    Enable Weblog Entry View Tracking?
      Yes   No  
    Enable Referrer Tracking?
      Yes   No  
    Maximum number of recent referrers to save
    500

    this was done months ago on on our tracking preferences part of the admin control panel

  • #27 / Feb 24, 2011 3:37am

    John Henry Donovan

    12339 posts

    bthom62,

    Check your email.

  • #28 / Feb 25, 2011 2:18am

    John Henry Donovan

    12339 posts

    bthom62,

    Ok for a start remove disable_most as a Global Variable because that will not work.
    Assign it as a variable in the beginning of your template

    {assign_variable:disable_most="member_data|trackbacks|pagination|category_fields"}

    You have template output turned on. You can see the global variable quite clearly not parsing within the weblog:entries tag parameters

    That should cull a few queries for you. Like I mentioned already that centre column has 17 weblog:entries tags and is a massive hit to performance

    Turn on Cache Dynamic Weblog Queries? in your Global weblog preferences which should speed things up a bit and take a hit out of those queries.

    Review Performance Guidelines on how best to use caching and construct templates

    If you are not confident in reviewing your templates then I would suggest contacting a member of the Pro Network to help you out

  • #29 / Feb 25, 2011 6:54am

    bthom62

    164 posts

    Thanks John

    I added that line

    {assign_variable:disable_most="member_data|trackbacks|pagination|category_fields"} 

    to the top of the template and took off the disable most global variable


    Engine hosting has been telling me over and over that they want all caching turned off, for it works better for them

    But I will do what you ask and let them know

    I use to run one div entry tag at the start and leave it add that, the site still ran.  CanI do that here?

    Again thank you

  • #30 / Feb 25, 2011 8:32am

    Sue Crocker

    26054 posts

    If you take off the disable_most, then you need to put it back in again by hand.

    Each of the 17 exp:weblog:entries loops need to have disable=“member_data|trackbacks|pagination|category_fields” added to them.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases