Too many connections?

Discussion in 'MySQL' started by Maximo, Jan 5, 2007.

  1. #1
    Ive read that sometimes there can be too many connections to the database.

    Apart from optimizing your scripting code, how do you go about fixing this? Do you simply add new databases or upgrade to a bigger MySQL database?

    Thanks
     
    Maximo, Jan 5, 2007 IP
  2. madkad

    madkad Active Member

    Messages:
    1,686
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    90
    #2
    no the reson for it is that there are limmits placed on your database/s that only allow so many conections at once.

    if you are with 1&1 then theres are very low and will get a msg saying

    too many connections to the database

    quite often if you get alot of traffic.
     
    madkad, Jan 5, 2007 IP
  3. Maximo

    Maximo Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks madkad

    What webhost would you recommend for a php/mysql site with 500+ unique visitors at any one time?
     
    Maximo, Jan 5, 2007 IP
  4. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #4
    This is a common problem with shared hosting. Often it's not even a problem with your applications but with someone on the same server with an app running amok. There is no foolproof way to avoid this.

    If you can afford it, upgrade to Virtual Private Hosting with A Small Orange.
     
    minstrel, Jan 5, 2007 IP
  5. madkad

    madkad Active Member

    Messages:
    1,686
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    90
    #5
    like the other member says its commen with shared hosting, so dedicated server can well will help, or see what other hosts can help you out.

    who are you with?
     
    madkad, Jan 5, 2007 IP
  6. Maximo

    Maximo Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Currently im not with anyone.

    Up until today i was with GoDaddy ('Economic' hosting plan) until i found out that their MySQL servers only support 50 (yes 50) active connections.
     
    Maximo, Jan 5, 2007 IP
  7. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #7
    50 connections for a forum is ludicrous. My last host allowed 500 and that kept crashing my forum.
     
    minstrel, Jan 5, 2007 IP
  8. madkad

    madkad Active Member

    Messages:
    1,686
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    90
    #8
    its a joke as alot of hosting companies dont show these details, but they show how big a database is, crafty if you ask me
     
    madkad, Jan 5, 2007 IP
  9. Maximo

    Maximo Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    What host are you with minstrel?
     
    Maximo, Jan 5, 2007 IP
  10. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #10
    minstrel, Jan 5, 2007 IP
  11. lkj

    lkj Peon

    Messages:
    729
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I would suggest going dedicated, or if you can't afford a dedicated server for a good price and lack OS management skills, then VPS may help (with control panel, for example based on Virtuozzo)...however, VPS may still require some level of OS management :)
     
    lkj, Jan 6, 2007 IP
  12. Maximo

    Maximo Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Hi everyone, thanks for all your comments.

    I emailed A Small Orange, HostGator and DreamHost, asking how much active connections (technical term: 'max_connections') their MySQL servers can hold. These were the results:

    A Small Orange = 25
    DreamHost = 25
    HostGator = 500

    GoDaddy has double that of Small Oranges and Dreamshosts!

    Anyway, these are for shared hosting (im guessin), but im gonna go with HostGator.
     
    Maximo, Jan 6, 2007 IP
  13. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #13
    ???

    Is that shared hosting with ASO? I'm with VPS and my forum often crashed on previous shared hosting with max=500. I'm having no problems with ASO VPS at all.

    Be wary: How this is set up is important. If you have max=500 shared among everyone else on the server, it's not as good as it sounds, believe me.
     
    minstrel, Jan 6, 2007 IP
  14. Maximo

    Maximo Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    The 25 connect for ASO mustve have been for shared.

    I done some further research on HostGator (reading up on their forum) and found that they DONT offer 500 connects. They only offer that for dedicated, even though they emailed me telling me it was 500.

    Now im looking into MediaTemple...
     
    Maximo, Jan 6, 2007 IP
  15. madkad

    madkad Active Member

    Messages:
    1,686
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    90
    #15
    500 over shared hosting is alot really and if they have alot on the same server that is going to make problems I am sure :|

    The website you own, does it make you any revienue?
     
    madkad, Jan 7, 2007 IP
  16. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #16
    If you're getting too many connections on shared hosting then you should really check you're using the most efficient software and seriously consider upgrading to a vps or dedicated plan.

    You'll have more resources and be able to tweak your server and mySQL configuration to optimize it for your site.

    Shopping around may or may not get you a bit more reliability at the moment, but if your site is growing you'll need to upgrade at some point anyway.
     
    rodney88, Jan 8, 2007 IP
  17. infonote

    infonote Well-Known Member

    Messages:
    4,032
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    160
    #17
    dev.mysql.com/doc/refman/5.0/en/optimization.html
     
    infonote, Jan 8, 2007 IP
  18. sgugal

    sgugal Peon

    Messages:
    183
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #18
    No Shared hosting plan can offer you beyon 50 connection to database at a same time . Definately you have to go with VPS or Dedicated . Also if you cannt afford dedicated server then few Hosts offer Semi-Dedicated servers . It means Dedicated server is shared between few clients only. The exact figure of "few " depends on Host .
     
    sgugal, Jan 8, 2007 IP
  19. web-rocket

    web-rocket Active Member

    Messages:
    394
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #19
    We offer 500 on all of our servers. Some of our members sites are massive. www.web-rocket.com
     
    web-rocket, Jan 17, 2007 IP