Hello Mark,

Thanks for the reply..

I would need to wait until load gets up there to see the state of apache but
even now with almost no load on the machine I'm seeing at least a dozen
connections in the "TIME_WAIT" state. On the flip site of things I have not
been seeing any other connection related issues from apache (no connection
reset by peer messages or anything like that)

I really don't think its any of the scripts either, everything was running
fine at another location (none of these errors ever came up) and the scripts
do run fine via the command line.

To give you a little more on the scripts..

I create a connection to the DB as the first thing in all scripts. That
connection is used anyplace a call to the DB is needed, (in other words I
don't fork anything or create any children, establish a second connection
etc.) there is never anymore then 1 connection made to the DB for any 1
script that is compiled at run-time.

For timeout, Apache has:
Timeout 300
KeepAlive On
MaxKeepAliveRequests 0
KeepAliveTimeout 15

One other test I did was put part of the site that was getting as many lost
connection errors as anything else, on another machine (the administration
side of it) and once there it ran perfectly using the same mySql server (and
its even IIS).

I'm leaning towards either Redhat 8, or Apache 2 or the combination of the
two of them - I just can't figure out what else to try or what to look for.
I hate the thought all the work involved in bring up a new machine and
bringing everything over when I at least have a error message to work with
:).

Thanks
-Chris


>>
>>
>> > The problem is this, everytime the web server starts to work a little
>> > (load via a uptime showing about 6), 1 out of 5 scripts bomb out with
>> > the message of:
>> >
>> > "failed: Lost connection to MySQL server during query"
>> >
>> > As load gets higher then the rate of failure gets higher.
>>
>>
>> I lack the necessary info on your scripts, of course; but you might be
>> looking at it from the wrong angle. I would ere expect a
>> time-out issue with
>> the Apache server (that is, with its spawned children). Try a
>> "netstat -a";
>> are many http connection in a TIME_WAIT state? The "Timeout" value in
>> httpd.conf also leaps to mind. A CPU load of 6, though not itself
>> excessively high, may be an indication that the Apache server
>> gets hits with
>> many, many requests, forcing many to remain in a TIME_WAIT state for a
>> while -- long enough to cause a potential problem for the MySQL
>> connection,
>> at least.
>>
>> A solid test, I would say, is to try and run your Perl scripts
>> directly, and
>> not via a web-page. I have a nagging suspicion the errors will be gone.
>>
>> - Mark



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to