IIS - Mysql Issue Issue

I developed a site on a linux server (my test host server). But when I move the site to a live server, which is IIS, Windows 2003 ... my site is very slow. Page loading takes about 20 seconds. My code is in PHP and I am using Wordpress. Normal Html, Php pages are fast, but when it connects to MySql .., it only takes 4-5 seconds to connect.

Any idea?

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

Let me know if I lack details.

Thanks in advance.

+4
source share
1 answer

Very often, this is a reverse lookup DNS problem.

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

Try starting MySQL with

[mysqld] skip-name-resolve 

in my.ini file and check if the problem has disappeared. Please note that setting this parameter means that you create user grants with IP numbers only ("GRANT ALL TO USER @ 10.1.1.1 ...") instead of using domain names.

If this option fixes the problem, enter DNS in order, and you can remove this option.

+5
source

Source: https://habr.com/ru/post/1316125/


All Articles