开发者

IIS - Mysql Performance Issue

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 i开发者_运维问答n 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.


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 USER@10.1.1.1 ...") instead of using domain names.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜