mysql problem

Discussion in 'ISPConfig 3 Priority Support' started by gpetrom, Dec 7, 2016.

  1. gpetrom

    gpetrom Member

    Hi

    In one of my sites i get this error.

    Warning: mysqli_real_connect(): (08004/1040): Too many connections in /var/www/clients/client5/web7/web/libraries/adodb/drivers/adodb-mysqli.inc.php on line 123

    I have searched in google and i have red that i should increase the maximum connections in mysql.
    Is this right?

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's right. Try to increase max_connections and max_user_connections in mysql my.cnf (in the [mysqld] section of the file).
     
  3. gpetrom

    gpetrom Member

    Thanks for the reply.

    Just to be sure.
    max_connections is for all users
    and max_user_connection is for every user
    Is this right ?
    and how many connections should you recommend for every user
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats right. The default is 100 if I remember correctly, I would set both values to 500 or if you want to have a lower level for a single user then set the global value to 500 and the user value to 300.
     
  5. gpetrom

    gpetrom Member

    Is there a way that i can see how many connections mysql has.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Login to phpmyadmin as mysql root user, there you will find the mysql database state and statistics in the upper menu.
     
  7. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Or install mysqltuner and run the script. This shows your some more data as phpmyadmin.
     

Share This Page