Re: long PHP mysql_connect times [Resolved]

2005-03-18 Thread Dan Tappin
Thanks Jeremy!
It was the lack of a reverse DNS entry.  I had the host resolved to an 
IP but now reverse arpa entry.  I added the DNS PTR record and viola!

I would have never though of / figured that one out.
Dan T
On Mar 18, 2005, at 10:59 AM, Jeremy Cole wrote:
Restating apache resets the issue i.e.  the next pconnects takes 5 
seconds.  Quitting the browser has no effect.  I am currently testing 
now to see if there is a time out issue i.e. if I wait 5 minutes will 
the delay reappear?
FWIW, this sounds like a slow-to-respond DNS resolver.  Are Apache and 
MySQL on seperate machines, by any chance?  Or, alternatively, are you 
connecting locally on the machine using the machine's DNS name?

E.g.: mysql_connect(foo.example.com, ...) instead of 
mysql_connect(localhost, ...)

Can you try this:
Whatever name you are using in mysql_connect(), run this:
$ host foo.example.com
Then, take the IP that gives you and do the same:
$ host 1.2.3.4
Mainly you're looking for the delay in this second step.
--
Jeremy Cole
Technical Yahoo - MySQL (Database) Geek

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: long PHP mysql_connect times [Resolved]

2005-03-18 Thread Jeremy Cole
Hi Dan,
It was the lack of a reverse DNS entry.  I had the host resolved to an 
IP but now reverse arpa entry.  I added the DNS PTR record and viola!
Excellent.
Also FWIW, you're not gaining anything by disconnecting after each query 
in your PHP code.  Connect once at the beginning of the script, 
disconnect once at the end.  All the extraneous connect/disconnect puts 
extra, unnecessary load on the database server.

I would have never though of / figured that one out.
Nobody knows... the troubles I've seen... :)
Regards,
Jeremy
--
Jeremy Cole
Technical Yahoo - MySQL (Database) Geek
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]