Grigory Bakunov wrote:

> Hello!
> 
> 
> TW> Hi all,
> 
> TW> I'm running MySQL Ver 3.23.32 for -freebsd4.2 on i386, With PHP4
> TW> compiled statically into Apache 1.3.17.  All connections 
> to the database
> TW> are non-persistent connections.  It's a pretty busy 
> server, hitting
> TW> about 60 queries per second during peak time. (Although 
> I'm not sure
> TW> that would qualify as busy on this list. :)
> 
> TW> I was wondering about a couple of the variables reported 
> in 'mysqladmin
> TW> extended-status', specifically 'aborted clients' and 'aborted
> TW> connections' and what the difference between the two are.
> 
> TW> We get a lot of these, but I'm guessing this is just an 
> artifact of
> TW> users hitting the 'stop' button before a page finishes 
> loading, or maybe
> TW> not.
> 
> TW> The other question I have is after a period of time, maybe about a
> TW> month, connections to the database will return an error 
> 'Too many errors
> TW> connecting to database, use mysqladmin flush-hosts ...' 
> or something to
> TW> that effect. (It's been awhile since it's happened.)  
> Flushing the hosts
> TW> solves the problem but I was wanting to do garbage 
> collection on these
> TW> connections to prevent this, and I was wondering what the 
> best method
> TW> would be.
> 
> In short words you need to close all opened connections in 
> your script.
> For example if you use in script
> $link = mysql_connect (...);
> you must close connection by
> mysql_close($link);
> in other case you have 'abborted connections'


PHP4 automatically closes connections when execution of a script
terminates. It also automatically frees memory used for results.
I doubt php is the problem. This of course doesn't mean its a mysql
problem either. :)

Regards
Mike Robinson
Toronto Star TV

Reply via email to