aspose file tools*
The moose likes JDBC and the fly likes MySQL error: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL error: "Too many connections"" Watch "MySQL error: "Too many connections"" New topic
Author

MySQL error: "Too many connections"

panuque bla
Greenhorn

Joined: Aug 01, 2011
Posts: 5
Hi,

i was searching for a month about that problem. All people says, obviously, is a problem that appears when MySQL cant get connections from the pool. I explain about my situation:

I have a web application on a local network managed with a server (Windows 2008). That application has about 7 users. The web application is always performing querys (connections) to the database (MySQL). Also, we have a web (on a public domain) that is always performing querys to the database, but this web do not have too many visitors, around 10/day.

My problem is, sometimes, when i restart tomcat/mysql, i connect to mysql on the command line and when i try to connect i get this error ("Too many connections"). I cannot understand how mysql cant get free connections from the pool after restart the service. The file configuration of the pool is a database.properties on the path of the web application.

My max_connections parameter on mysql is 250.

Thank you!
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2597
    
    9

Did you try connecting to mysql using root? Is the max connection really 250? Use the "show variables;" once inside. You may want to ensure it really is 250 when starting the mysql service. The link below should give you why you are experiencing this.

Too many connections


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
panuque bla
Greenhorn

Joined: Aug 01, 2011
Posts: 5
K. Tsang wrote:Did you try connecting to mysql using root? Is the max connection really 250? Use the "show variables;" once inside. You may want to ensure it really is 250 when starting the mysql service. The link below should give you why you are experiencing this.

Too many connections


Thanks. I tried to connect mysql using root (instead i always connect mysql using root), and with "show variables like max_connections" i get 250. Anyway im going to try again to see if when i restart mysql the variable max_connections restarts.

Thanks for the link.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MySQL error: "Too many connections"