>>>>> "Yan" == Yan Zhang Chen <yzc@stripped> writes:
Yan> On Mon, 23 Aug 1999, Michael Widenius wrote:
>>
>> Hi!
>>
>> >>>>> "Terry" == Terry Brown <Terry.Brown@stripped>
> writes:
>>
Terry> Hi all,
Terry> I have a query for anyone running Mysql with large concurrency via
Terry> CGI. This is a follow up to a post I sent about 3 months ago.
>>
Terry> The full specifications are listed below and you'll probably see, I've
Terry> tried a lot of configurations.
>>
Terry> We need mysql to accept ~200 concurrent connections (via Perl CGIs) and
Terry> each of those connections runs through 4 perl CGI's and makes approximately
Terry> 50selects, 20inserts over the 4 scripts (70x200=14000 interactions). I can
Terry> test everything with Apache benchmark with 400 concurrent connections to
Terry> the first script (the login script) once. This will 95% of the time
Terry> succeed without any errors and send the system load to ~80-120. If it is
Terry> tried again (even after the system load drops back down) there are a number
Terry> of failures reported by Apache benchmark and looking in the logs reveals a
Terry> Can't connect to Mysql server.
>>
>> It's very likely that you get this error because of the delay when a
>> TCP/IP connection is closed (typically 30 seconds).
>>
>> The fix is to use persistent connections and/or increase the number of
>> active TCP/IP connections your OS (not mysqld) can handle
>> This should be as many connections that you get during 30 seconds).
Yan> We had same experience a while ago; we can't use persistent connection
Yan> from PHP, because mysqld would get lots of zombie threads hanging (which
Yan> results in high load (90+%) on the mysqld host). We are running on
Yan> Digital's Unix. We didn't have the time/resource to try resolving this issue
Yan> (I don't really know whether it's caused by the server or client end).
Hi!
If a mysqld thread because a zombie, then there is a bug in mysqld or
in the thread library.
I am sorry that you didn't have time to track down the problem (It's
usually don't that hard if one follows the recommendations from the
MySQL manual)
Regards,
Monty