Re: MySQL + PHP on WinXP x64 = ?? - clarification

Re: MySQL + PHP on WinXP x64 = ?? - clarification

am 12.03.2009 22:39:24 von Yves Sucaet

Hi Chris,

I don't need 120 concurrent connections. The problem arises from subseque=
ntly
opening connections and the script is a way to simulate the problem: the
first
100 connections e.g. open up fine; then the next 5 mess up; then the next=
7
are good to go again etc...

I'm using the basic PHP php_mysql.dll driver. I've used MDB2 from PEAR as=

well: same result. I think both of these use the C API, and not the
ODBC-driver.

Yves

------ Original Message ------
Received: Thu, 12 Mar 2009 04:30:33 PM CDT
From: Chris
To: YVES SUCAET Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] MySQL + PHP on WinXP x64 =3D ??

YVES SUCAET wrote:
> Hi List,
> =

> I'm experiencing the problem as described at
> http://forums.mysql.com/read.php?37,39779,136287#msg-136287
> =

> I'm using the following script to test:
> =

> > $p =3D 0;
> $n =3D 0;
> for ($i =3D 0; $i < 120; $i++) {
> $conn =3D mysql_connect("www.myserver.org", "user", "secret");
> if ($conn) {
> echo "Success!\n";
> mysql_close($conn);
> $p++;
> } else {
> echo "Failed test $i\n";
> $n++;
> }
> sleep(1);
> }
> echo "\n$p successes, $n failures\n";
> ?>
> =

> Results are very unpredictable. E.g. out of 120 connection attempts, I'=
ll
have
> 114 successes and 6 failures.

Well to be honest my question would be why do you need 120 connections =

in one script?

> The solution that's mentioned is to enable connection pooling, yet sinc=
e
I'm
> using the x64 edition, that doesn't work for me.

Why doesn't it work for you? What package were you going to use for =

connection pooling? Is there an alternative package to try?

-- =

Postgresql & php tutorials
http://www.designmagick.com/








--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: MySQL + PHP on WinXP x64 = ?? - clarification

am 12.03.2009 22:54:22 von dmagick

YVES SUCAET wrote:
> Hi Chris,
>
> I don't need 120 concurrent connections. The problem arises from subsequently
> opening connections and the script is a way to simulate the problem: the
> first
> 100 connections e.g. open up fine; then the next 5 mess up; then the next 7
> are good to go again etc...
>
> I'm using the basic PHP php_mysql.dll driver. I've used MDB2 from PEAR as
> well: same result. I think both of these use the C API, and not the
> ODBC-driver.

Have you changed the max_connections setting?

http://dev.mysql.com/doc/refman/5.0/en/server-system-variabl es.html#sysvar_max_connections

If you have, what is mysql_error() reporting when it can't connect?

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php