Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqli_connect latency

Tags:

php

mysql

mysqli

I just recently had to reinstall my wamp package so I end up with a fresh apache 2.2.22, php 5.4.3 and mysql 5.5.24 .

One big change who occured was the page generation time. I dug a bit and found out that the call to mysqli_connect was taking up to 2 seconds.

So it still works, so my users have been well reconfigured and the whole system stands up - only this detail who make the whole unusable.

Does anyone knows where this latency could come from?

EDIT: it seems to be a dns problem as you proposed - Now, if I change to 127.0.0.1 I have an access-denied. I keep on digging

like image 736
eddow Avatar asked Feb 20 '23 06:02

eddow


1 Answers

I had the same exact, i was connecting to "localhost" and i had 1.5 sec for each "connect", now i'm using 127.0.0.1 instead and it works great now ! FIY, tested with windows 2008 R2 x64 + plesk 11 php 5.3 (and php5.4 as well)

like image 70
Xavier.be Avatar answered Feb 22 '23 02:02

Xavier.be