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.

Database connections

February 28, 2011 11:46am

Subscribe [3]
  • #1 / Feb 28, 2011 11:46am

    One of our websites had traffic on the weekend and caused it to crash.

    We have thelatest version of expression engine with the following features:

    - Tracking/Trackbacks turned off
    - ‘Save as Template as files’ turned on
    - SQL caching turned
    - Template cachign turned on

    However there are still lot of sql connections created for example:

    select exp_templates.template_name
    select action_id, class, method from exp_actions
    select es.*
    select * from exp_member_groups where site_d = 1 and group_id = 3

  • #2 / Feb 28, 2011 5:17pm

    Ingmar

    29245 posts

    Yes, there will still be queries to the database; EE is a dynamic system, after all. So, what you’re seeing appears to be expected behavior.

  • #3 / Mar 18, 2011 11:42am

    True it is a dynamic site. But there seems to be alot of unecessary queries.

    DO we really need to query the member table on a live site for guests that visit the site

    Do we also need to query the template table when templates are being saved as files.

    There is a cache setting, but even the cache table gets queried?

  • #4 / Mar 19, 2011 4:24pm

    Greg Salt

    3988 posts

    Hi Sky Small Projects,

    Can we get a little bit more information about your site and your setup so we can help with this? Which version are you using on this site - I know you said latest in your first post so that should be 1.7.0. Is the site hosted professionally? If you turn on “Display SQL Queries?” at Admin > System Preferences > Output & Debugging how many queries are you generating on the templates which received the traffic? Which addons do you have installed?

    Cheers

    Greg

  • #5 / Mar 23, 2011 9:32am

    Hi Greg,

    Thanks for your reply,

    The current version is 1.6.4 live which can handle 1 connection per second before dropping off.
    However the tests carried out are on 1.7.0 (local machine) at 3 connections per second but still produces many sql queries.

    We have turned on “Display SQL Queries?”. But we can’t see any SQL queties for the homepage (as this is the page recieving most traffic for us)

    we have the following modules:
    * navigator
    * referrer
    * selected items
    * freeform
    * photo gallery

    Thanks,

  • #6 / Mar 23, 2011 4:52pm

    Sue Crocker

    26054 posts

    Are you logged into the front end of the site when visiting it? If you aren’t or aren’t a SuperAdmin, you won’t see any queries.

    Let’s get that working first..

    Usually this problem happens because you’re logged into the www version of your site, and you’re visiting the non-www version, or vice versa.

    In your 1.7 build, navigate to: Admin > System Preferences > Cookie Settings

    Once there, define your cookie domain as such: .domainname.com (notice the “.” at the beginning. Use the “.” so that both http://www.domainname.com and domainname.com have the same cookies).

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

ExpressionEngine News!

#eecms, #events, #releases