SQLSTATE[08004] [1040] Too many connections

前端 未结 4 1743
小鲜肉
小鲜肉 2020-12-14 16:35

I\'m getting this error messages SQLSTATE[08004] [1040] Too many connections, I\'m using pdo adapter. Do I need to close connection? And how I do that?

相关标签:
4条回答
  • 2020-12-14 17:03

    The root cause for this error for me was a full hard drive. Keep that in mind as a possibility.

    0 讨论(0)
  • 2020-12-14 17:07

    In your mysql my must to run this:

    Set Global max_connections=2000
    

    I'm using phpMyAdmin and I executed

    0 讨论(0)
  • 2020-12-14 17:19

    In your my.conf file (usually located in /etc) find the line that says:

    [mysqld]
    

    And somewhere below that set

    max_connections=500
    

    Or whatever numeric value you need.

    More information here: MySQL 5.5 Reference Manual: Too many connections.

    0 讨论(0)
  • 2020-12-14 17:27

    You need change your my.cnf file.

    [mysqld]
    set-variable=max_connections=250
    

    Upper the value.

    0 讨论(0)
提交回复
热议问题