Miscellaneous ⇒ Chit-Chat ⇒ Slow MySQLi real_connect ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexChit-Chat

Slow MySQLi real_connect Reply to topic


MySQLi::real_connect() can take one or more seconds to connect when you pass localhost as parameter.

I have not found the real issue as yet but it could be related to PHP trying to use pipes instead of TCP/IP, maybe a Windows 7 issue or something else.

My current setup is using a default Windows 7 XAMPP installation and latest Mercurial v10.

However using 127.0.0.1 as database host simply solve the issue.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Nano, as far I know the issue (slower x/wamp) can be fixed adding (un commenting) this two lines in the windows host file

127.0.0.1 localhost
::1 localhost

windows\system32\drivers\etc\hosts

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Modified hosts file but I believe I have to wait till next restart to be 100% certain.

Hosts file changes should be picked up straight away, but not even ipconfig /flushdns or net stop "DNS Client" (and then start) helped yet.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


On google there are reported issues with concurrent connections on Windows OS.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

All times are UTC


Jump to: