Php – Slow PHP Page Load on IIS7 until AppPool is Recycled

application-poolsfcgiiis-7PHP

Using PHP 5.3.13 and MySQL 5.5.25 on Server 2008 R2 (IIS 7.5).

I have a PHP page that pull some info from MySQL and outputs some XML. The page works fine, and takes about 5 seconds to load a very small array when the server is first booted up.

However, when I recycle the app pool for the site it begins to load instantly. If I reboot the server it loads slow again until I manually recycle the app pool.

Any ideas?

Best Answer

What about caching your query to reduce the time for execution, or what about recoding the query or adding index for mysql table it's that will be the best result yet.

Related Topic