Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

error too many connection in mysql

error too many connection in mysql

 
Post new topic   Reply to topic     Forum Index -> DataBase, RDBMS, MySql, Oracle, db2, SQL Server problems
View previous topic :: View next topic  
Author Message
good



Joined: 21 Jun 2007
Posts: 1

PostPosted: Thu Jun 21, 2007 1:20 pm    Post subject: error too many connection in mysql Reply with quote




Hi, i am using mysql database. sometimes i got problem of too many connection. cannot connect to database. Then i have to shutdown my server then restart mysql server then it solve problem. But this is not solution. i dont want to restart mysql. If anyone have the solution for too many connection please help me
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 24 Aug 2006
Posts: 30

PostPosted: Sun Dec 09, 2007 1:41 pm    Post subject: Too many connection problems in mysql Reply with quote

Default connection for mysql for client is maximum 100
when connection exceed from 100, it will not accept another connection. In this case mysql throw error of too many connections.

you need to do setting for attribute max_connections
to increase the limit of connections.
In linux the mysql setting file
/etc/my.cnf
In Windows the mysql setting file
my.ini
add this in this file
max_connections=250
or whatever you want limit
Back to top
View user's profile Send private message Send e-mail
seniormember
Site Admin


Joined: 20 Jul 2008
Posts: 77

PostPosted: Sun Oct 12, 2008 8:33 am    Post subject: Reply with quote

If error of too many connections comes, you need to look what is problem with your code also. You have closed all connection opened to database in your code?

Mysql Can only open 100 connection at a same time. If connection exceed above 100 connections it will not execute any query, until any connection is free.

you can increase total number of connection can open at same time in mysql my.ini file.

c:\Program Files\MySQL\my.ini
or my.cnf file for older version of mysql.

If no file is found you can create own file where you can define

search
max_connections=100
to
max_connections=250
Back to top
View user's profile Send private message
struts10



Joined: 21 Jun 2007
Posts: 3

PostPosted: Fri Nov 28, 2008 1:22 pm    Post subject: Reply with quote

Mysql launched MySQL Enterprise version
It has more power and feature, can define dynamically connections

dynamically configuring the max_connections variable

http://www.mysql.com/products/enterprise/advisors.html

http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html

Obviously no one want this error
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DataBase, RDBMS, MySql, Oracle, db2, SQL Server problems All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack