1. CodersEden Marketplace for designers and developers

CDbException CDbConnection failed to open the DB connection.

Discussion in 'General discussions' started by Ron, Sep 23, 2015.

  1. carlos alvarez

    carlos alvarez Member

    Joined:
    Aug 30, 2016
    Messages:
    94
    Likes Received:
    17
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    @twisted1919

    Inside my.cnf config file, I have changed:

    max_user_connections=100

    To: max_user_connections=1000

    and the problem was solved !

    Thanks for your advice.
     
  2. carlos alvarez

    carlos alvarez Member

    Joined:
    Aug 30, 2016
    Messages:
    94
    Likes Received:
    17
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    @twisted1919

    I changed:

    max_user_connections = 100

    To:

    max_user_connections = 1000

    inside my.cnf and the problem was solved !
     
  3. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,659
    Likes Received:
    2,472
    @carlos alvarez - that's nice to hear, as you see there are many pieces you have to take care of beside just mailwizz ;)
     
  4. Elancers Ltda

    Elancers Ltda New Member

    Joined:
    Mar 15, 2017
    Messages:
    4
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    Hi dear
    in my.cnf
    max_connections=250 or above

    and

    max_user_connections = 1000 or above
     
  5. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,659
    Likes Received:
    2,472
  6. Elancers Ltda

    Elancers Ltda New Member

    Joined:
    Mar 15, 2017
    Messages:
    4
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    yes this error
    CDbConnection failed to open the DB connection: SQLSTATE[08004] [1040] Too many connections
     
  7. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,659
    Likes Received:
    2,472
    @Elancers Ltda - then i see no way than to increase those even more...
    One thing, maybe you're wondering what's happening that you get so many connections. The answer is that when you send a campaign and opens/clicks start to happen, they'll flood your server, so your server needs to be prepared for this.
     
  8. Elancers Ltda

    Elancers Ltda New Member

    Joined:
    Mar 15, 2017
    Messages:
    4
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    @twisted1919 ,
    In fact, when I hired the RDS server in amazon AWS, it only came with max_connections = 35 and so I had a lot of problems. I adjusted it to a fair value and put it to 250.
     
  9. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,659
    Likes Received:
    2,472
    @Elancers Ltda - That good, make sure you restart if after you do new changes, so they take effect.
     
  10. Mohit1946

    Mohit1946 New Member

    Joined:
    Sep 22, 2017
    Messages:
    20
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    3
    i can resolve this issue easily..
    Contact me or PM me-

    Skype:
    ID(world_338)
     
    Last edited: Apr 24, 2018
  11. Gary Orman

    Gary Orman New Member

    Joined:
    Jan 27, 2020
    Messages:
    6
    Likes Received:
    0
    S.E:
    2021-01-26 23:48:47
    L.T:
    Regular
    L.C:
    1
    Yes, I had exactly the same problem. I'm using AWS virtual servers and there was no max_connects or max_user_connections listed in the my.cnf file.

    BTW, it took me ages to find where this file is stored on my server. In my case it was simply in /etc (off the root of the server). But I noticed Carlos has his in /etc/mysql. It's all very confusing.

    Secondly, it's really important to reboot (or restart the MySQL server, if you know how to do that coz I don't) otherwise it has no effect!
     
  12. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,659
    Likes Received:
    2,472
    You can only reboot mysql: systemctl restart mysql
     

Share This Page