Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2007
    Location
    Queenstown, New Zealand
    Posts
    386
    Plugin Contributions
    0

    Default Exceeding database connections

    Hi,
    I'm having a problem exceeding mysql database connections.
    So I'm wondering:
    * When I'm in zen admin, do I need to log out in order to disconnect the connection.
    Or is just closing the browser enough (and I do that a LOT of times per day)

    * When in phpmyadmin, there's no logout button. Is closing the browser ok there as well.
    * Same question for Cuteftp connection. Should I log out, or is browser close ok.

    I don't have a lot of customers at one time and only 1 database gets any real use.
    Phpmyadmin is optimized frequently.
    Apparently I'm reaching 100% cpu usage on server occasionally.

    My logs folder only has 2 errors this week and both would relate to this problem.
    The log is:
    0B_ERROR_NOT_CONNECTED :: select * from project_version WHERE project_version_key = 'Zen-Cart Database' in /home/MINE/public_html/MINE.co.nz/includes/classes/db/mysql/query_factory.php on line 120

    Thoughts?

  2. #2
    Join Date
    Jan 2004
    Posts
    60,707
    Blog Entries
    4
    Plugin Contributions
    149

    Default Re: Exceeding database connections

    Your post is talking about 5 different things.

    Number of database connections is not the same as CPU usage, which is not the same as FTP connections, which is not the same as number of customers at one time, which is not the same as the number of databases, which is not the same as browser connections.

    Who's your hosting company?
    How many hits per day are you getting on your site? How many at one time, sustained for how long at a time?
    How many concurrent database connections do they allow you to have?
    How many queries per hour do they let you have?
    Or are they *actually* complaining about CPU usage?

    If the root issue is that they're throttling your number of queries, then there's a way to trick that until you can get a host who doesn't cheap out by throttling unnecessarily.

    It sounds like their server is oversold, as in they've got too many websites running from the one server. That's usually where they upsell you to a more expensive plan, instead of tuning the server better.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  3. #3
    Join Date
    Jan 2007
    Location
    Queenstown, New Zealand
    Posts
    386
    Plugin Contributions
    0

    Default Re: Exceeding database connections

    Thanks for a reply Dr Byte.
    Yes I'm sure my post is from all over the place, but when I know nothing about database connections or anything else I've noted it's very hard to explain.
    Under counter history an average would be 500 - 4500 (taken from admin front page)
    We only get about 10 people max at any one time.
    One of the hosting staff mentioned it's probably 10 concurrent database connections.
    He didn't think they had a set limit of queries per hour.

    I mentioned the cpu part, only as they told me it had reached 100% a few times this week.
    So I was wondering what might cause that.

    Over the last 15 minutes, I've been refreshing cpanel to take a look at cpu load with about 4 people on my site.
    At one stage it went to 40%, but is mostly at 0 or small.
    When clicking Server Status in cpanel, the Server Load was up around 12 (2cpus) with an ! status.
    This is down around 7 now, but isn't this rather high?
    (the only other ! comes from Disk/dev/mapper/VolGroup... 87%, but I don't know what that is)

    Sorry if these are all bits not related entirely, but they're all things I'm noticing, so have to work out what I can.
    Thanks again.

  4. #4
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,687
    Plugin Contributions
    5

    Default Re: Exceeding database connections

    Asked but not answered...
    Who is your host?

  5. #5
    Join Date
    Jan 2007
    Location
    Queenstown, New Zealand
    Posts
    386
    Plugin Contributions
    0

    Default Re: Exceeding database connections

    Flexihost (New Zealand), operated by Openhost/hosting direct.

  6. #6
    Join Date
    Jan 2007
    Location
    Queenstown, New Zealand
    Posts
    386
    Plugin Contributions
    0

    Default Re: Exceeding database connections

    So for anyone else who has terrible loading times for admin or website, but a good internet connection...
    Check your server for 'server load'
    Ours was around 12 (2cpus)
    It should be around 2 max ideally.
    I have been shifted to another server and my website now loads like lightening.
    After spending months trying to make my zen-cart faster, turns out my host is to blame. (though hopefully I've improved my site anyway)
    New server runs at about .1 server load :)
    So check that if you can't find any other reason!

  7. #7
    Join Date
    Jan 2004
    Posts
    60,707
    Blog Entries
    4
    Plugin Contributions
    149

    Default Re: Exceeding database connections

    Quote Originally Posted by mcpisik View Post
    So for anyone else who has terrible loading times ... [the] host is to blame.
    Always is. But nobody believes me when I say it.
    Ya, it'd be great if the host would always fix it themselves, since that's almost always easier than switching hosting companies.
    Glad they did something to take care of you. Just watch for when they oversell that new server in a few months and the problem re-occurs again.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  8. #8
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,958
    Plugin Contributions
    3

    Default Re: Exceeding database connections

    For years I have been saying that your HOST is one of your most important business partners in an eCommerce venture. In fact, the webhost is perhaps THE most critical business partner you have.

    A poor host can result in a loss of thousands (dollars, pounds, rupees, yen...) and yet so many people starting out in web selling opt for cheap-n-nasty hosts thinking that they can save a buck or two.

    I have a handful of chosen hosting companies (in the UK, USA and Europe) and when I take on new clients who have cheap hosting, the FIRST thing I do is insist they migrate to one of these hosts. If they refuse, I generally do not take them on as clients.

    Be RUTHLESS with your hosting company - and criticise them publicly if they fail to come up to scratch.

    I have arranged hundreds of sites on my UK host and have NEVER EVER had downtime, malconfigurations, poor service, low loading - and we're now into our sixth year with this company.

    That's pretty impressive. NOT ONE SECOND of downtime in 6 years... for several hundred sites.
    Our latest project is Pet Tags.

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    4,958
    Plugin Contributions
    3

    Default Re: Exceeding database connections

    Quote Originally Posted by DrByte View Post
    Always is. But nobody believes me when I say it.
    Nor me.
    Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

 

 

Similar Threads

  1. User Database Connections Maxed Out
    By 93_S13 in forum General Questions
    Replies: 0
    Last Post: 9 Apr 2010, 07:20 PM
  2. Persistent Database Connections (USE_PCONNECT)
    By marcopolo in forum Basic Configuration
    Replies: 4
    Last Post: 16 Mar 2009, 11:33 PM
  3. database connections
    By r885146 in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 9 Jun 2006, 06:02 PM

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
  •