Michael Winston said:
>
> On Sep 1, 2004, at 9:10 AM, V. M. Brasseur wrote:
>
>>
>>
>> Michael Winston wrote:
>>> Hi-
>>> We've been running into a pretty serious problem for the past several
>>>  versions of mysql 4.0 running on OS X (both client and server).
>>> Every once in a while we wake up to find the "too many connections"
>>> error coming up.  There really aren't too many connections (we have
>>> our max set to 99) - it's the type of message that appears when a
>>> wrong password is used too many times (and I'm 100% sure this isn't
>>> happening).
>>> Now, the problem is that once this message starts appearing we can't
>>> even connect with mysqladmin as root.  That "extra connection" that
>>> mysql promises doesn't exist.  The only way we can shut down mysql is
>>>  to perform a 'kill -9' (then restart the server and repair all the
>>> tables).
>>> And we can't reproduce this problem at will.  This is driving us
>>> nuts. Before I report this as a bug I wanted to know if anyone else
>>> has  seen something like this or has any suggestions of how to narrow
>>> down  the problem.
>>> Thanks!
>>> Michael
>>
>> We've run into this problem ourselves, also using 4.0 but on a 64bit
>> AIX.  The problem we found was that some queries were firing off
>> threads which never ended.  These threads blocked other threads, which
>>  blocked other threads...  A logjam resulted with all connections
>> ended  up being used by the offending threads.
>>
>> The fix was to *ahem* fix our queries so they'd close their database
>> connections once they were complete.  You may wish to do a code
>> inspection and verify that every open connection has a matching close.
>
> Hmmm.  All of our connections are coming from php-generated web pages.
> PHP automatically closes the connection at the end of the script.
> Unless I completely misunderstand how this stuff works.  Plus, this
> problem only happens once every few weeks.  If some of our queries are
> causing this, I would expect the problem to occur more often.
>
> I'll look into this, though.
>
> Thanks,
> Michael
Actually php may be using connection pooling which will NOT close off the
connections.  It can be configured either way in the apache php
configuration file.  I use squirrelmail, which is a php based webmail
system with MySQL holdin configuration information and those connections
never close, they just go inactive.  There is one connection for each
apache child. Since apache doesn't use the same child the answer the query
each time, on a busy server you may end up with quite a few connecitons. 
Just a thougth.

-- 
William R. Mussatto, Senior Systems Engineer
Ph. 909-920-9154 ext. 27
FAX. 909-608-7061



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to