MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jesse Date:February 25 2010 11:38pm
Subject:Re: What is "unusually high" for the # of connections to MySQL?
View as plain text  
Thank you so much for the reply.  I think we may have stepped outside of the MySQL realm
now, but here is what I know:

* At least a couple times, recycling the application pool started things right up, but
that did not always work.
* When this is going on, I cannot even get to a page itself, let alone execute a function
that runs a query.
* One time when this happened, we moved the entire app to an OLD WS03 server.  It had only
2 GB, I believe, and it ran like champ after that. Due to "circumstances beyond our
control", we had to move it back to the WS08 server, and here we are again with the same
* I can log on to the server, no problem.  I can also log on to MySQL and run queries.  I
would think that if the database server were the problem, I would not be able to do that.
* Do do frequently get errors when this is occurring. These are errors.  here are
a few of those:
   MySql.Data.MySqlClient.MySqlException: error connecting: Timeout expired
    System.IndexOutOfRangeException: Could not find specified column in results
    Object reference not set to an instance of an object
    System.IO.IOException: Unable to write data to the transport connection: An existing
connection was forcibly closed by the remote host
    42000You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use  near ''SHOW VARIABLE'' 
    Key cannot be null

The list goes on. As you can see, the errors are all over the board. Some make sense, some
do not. For instance, the "you have an error in your sql" does not, because this same area
of code works perfectly Many times throughout the day, and I or no one else has changed
it. Plus, the one stating ''SHOW VARIABLE''  makes no sense at all.  I have not executed
such a function in my code.

  ----- Original Message ----- 
  From: Claudio Nanni 
  To: Jesse 
  Cc: mysql@stripped 
  Sent: Thursday, February 25, 2010 6:28 PM
  Subject: Re: What is "unusually high" for the # of connections to MySQL?

  It depends, but 100 is not strange at all, particularly if you have sleeping connections
  (usually due to slow page loading (ajax?) and/or persistent connections from the app)
  and any number of connections cannot crash a server, can make it slow or unusable, but
not crash it.
  Watch the app, you could have for loops banging the database, a not optimized app can
kill cause a D.O.S.(=bad) of MySQL.

  Anyway the point is another.
  I think you cant afford guessing, it will take a huge amount of effort to try to guess
why it crashes.
  Find the more information you can enabling all the logging possible, put server
parameters under graphing,
  the more information you have on the crash, the less you will need to guess.
  Watch, cpu(load, context switches), ram(usage,swapping), IO.

  Guess less, know more.


  2010/2/26 Jesse <jc@stripped>

    I was wondering what would be considered "unusually high" for the # of connections to
a MySQL Server?  Also, if a high number of these are in "sleep" mode,does it make a

    We have a web site (a few, actually) and MySQL (Version 5.0.67-community-nt-log) 
running on a WS08 server, and several times now, we have basically had the web site
"crash" on us.  One tech thought that it may be the # of connections.  I have seen between
100 to 125 connections or so at one time 98% of them all from the same user. This is from
our web application that we're using for testing. The app basically becomes
unresponsive, but I'm not 100% convinced that this is a MySQL problem.  The site does not
even seem to be serving up pages when it gets into this "mode".

    Also, there are other web sites on this same server (not being used a lot at all), and
these sites all seem to come up just fine. There are no connection issues with the pages
or with the data in those applications.

    My main questio is this.  Is 100 to 125 unusually high?  I have implemented a
connection pool into my connection string in hopes that this will resolve the problem. 
Here is that string:

Zero Datetime=true;pooling=true; max pool size=10; min pool size=3

    Someone else suggested this string, but after implementing it and re-starting the
server, we still had the same problem.  My plan is to move the app to a WS03 server
tonight in hopes that the issue is the O/S.

    Can anyone fill me in?


    MySQL General Mailing List
    For list archives:
    To unsubscribe:


What is "unusually high" for the # of connections to MySQL?Jesse26 Feb
  • Re: What is "unusually high" for the # of connections to MySQL?Claudio Nanni26 Feb
  • Re: What is "unusually high" for the # of connections to MySQL?Jesse26 Feb
    • Re: Re: What is "unusually high" for the # of connections to MySQL?claudio.nanni26 Feb
      • Re: Re: What is "unusually high" for the # of connections to MySQL?Ananda Kumar26 Feb