DeveloperSide.NET Forums
July 08, 2020, 03:25:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: max_connections  (Read 18905 times)
0 Members and 1 Guest are viewing this topic.
Jr. Member
Posts: 38

View Profile
« on: April 26, 2010, 03:00:43 PM »


For some reason max_connections did not give me any results in the forum search, anymay

I get more and more :

Warning: mysql_connect() [function.mysql-connect]: Too many connections in D:***********\includes\functions\database.php  on line 19
Unable to connect to database server!

or this :

Link to database cannot be established.

Depends on which system used for the website.

Si I thought I must have a limit or a default connection limit in apache or mysql, but now I do not know where should I change this setting

httpd.conf or vhost.conf ???
my.ini ???

What line to change ??? or add ???

How can you do so if maximum connections is reached that it tells a message online, but when trafic decreases everything comes back to normal instead of getting stuck with that stupid message that no usal person would understand.

Master of All Subjects
Posts: 3272

View Profile WWW Email
« Reply #1 on: April 26, 2010, 03:53:36 PM »

You would edit my.ini and under the [mysqld] section, insert or modify line:

100 is the default value.

Once this number is reached you get the mentioned message until that connection number goes down.

To handle the warning, you would have to code the php script to test for it and act appropriately (display a different message/page) (see user comments in the above link for examples).
« Last Edit: April 27, 2010, 05:32:55 PM by admin » Logged

Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Jr. Member
Posts: 38

View Profile
« Reply #2 on: April 26, 2010, 04:08:21 PM »

Thanks for the quick reply (as usual).

I already changed the 100 to 200, found that line by using the controler edition (pretty easy to use this way)

I will check your link thank you.

Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!