MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Fagyal Csongor Date:February 6 2007 11:36am
Subject:Re: error 99(?) : can't connect to MySQL server
View as plain text  
Nils Meyer wrote:

> Hi Faygal,
>
> Fagyal Csongor wrote:
>
>> for (1..50000) {
>>     $dbh = DBI->connect($dsn, $user, $password, {'RaiseError' => 1} );
>>     my $sth = $dbh->prepare('SELECT * FROM users');
>> }
>>
> I think you are simply running out of available outgoing ports with 
> that. Here is some more insight on that topic:
>
> http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/ 
>
>
> Don't be confused with the PHP mentioned, the first paragraphs apply 
> to TCP/IP and mysql as whole.
>
> regards
> Nils

Thanks, Nils.

Actually I got to the same conclusion, too... when this error appears, there are something
like 15000 TCP connections around, mostly in "TIME_WAIT". Too bad these connections linger
around even after an explicit ->disconnect().

I should be using a persistent connection anyway :)

- Csongor

Thread
Primary Key questionHaisam K. Ido1 Jul
  • Re: Primary Key questionAlec.Cawley1 Jul
Re: Primary Key questionHaisam K. Ido1 Jul
  • error 99(?) : can't connect to MySQL serverFagyal Csongor6 Feb
    • Re: error 99(?) : can't connect to MySQL serverNils Meyer6 Feb
      • Re: error 99(?) : can't connect to MySQL serverFagyal Csongor6 Feb