I am having some difficulty locating the cause of php webpages loading slowly through IIS. The php code uses several select statements with no joins. I think I have isolated the problem to communication with sql server from the php odbc connection. It seems some others have had similar issues so I have tried the following: changing the output buffering in php to On (it was previously on, but at 4096), and trying to pass odbc_connect different pointer types(this did show a small speed improvement, but nothing significant).
We have tried 2 different sql servers, and both remain at 50% cpu utilization for 20 to 30 minutes while the webpage loads. It does eventually load, but it seems to be taking quite a lot of time. The IIS server never goes about 5%, so this leads me to believe that the sql server is not responding as fast as I would like.
I would like to avoid changing from odbc to some other connection method since I have written all of my php using odbc functions. Below is the connection string I use to connect to sql from php(I used tried SQL_CUR_USE_ODBC but this caused some problems with the odbc_fetch_row() function )
An additional piece of information (I am using port 5050 on IIS, instead of 80(we currently have another website running on 80), but I can see no reason why this should effect the connection to sql)
Thanks in advance for the help.
Start Free Trial