views:

25

answers:

1

Hi,

I have developed a site on linux server(my testing host server). But When I move the site to live server, which is IIS, Windows 2003... my site is very slow. It takes around 20 seconds to load a page. My code is in PHP and I am using Wordpress. Normal Html, Php pages are running fast, but when it connects to MySql.. it takes 4 to 5 seconds to connect only.

Any Idea?

Details: IIS Windows 2003 PHP Mysql Wordpress (I have used odbc to connect to mssql database for some pages)

Let me know if I am missing any details.

Thanks in advance.

A: 

Very often this is a DNS problem with reverse lookups.

When you connect to MySQL, MySQL will try to determine the host name for the IP that just connected to it. If the MySQL cannot reach a DNS server for this, there is a 5s timeout.

Try to start MySQL with

[mysqld]
skip-name-resolve

in the my.ini file and see if the problem goes away. Note that setting this option implies that you create user grants with IP numbers only ("GRANT ALL TO [email protected] ...") instead of using domain names.

If that option fixes the problem, get your DNS in order and you may remove the option.

Isotopp
Thank you Isotopp... it worked !!!!
aayushi