Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Do you really want IIS for this? There are preconfigured packages with Apache and php (even mysql) available. –  cstamas Jul 24 '12 at 19:04
    
IIS offers us a more manageable and scalable web server in our environment. We have 20 IIS servers working great. Just having this one issues at the moment. Across a few boxes. –  JuanValdez Jul 24 '12 at 21:18
add comment

2 Answers 2

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.

share|improve this answer
    
I think caching is outside the scope of the issue. Recycling the app pool on boot solves the issue. And seeing this is a dev box there is no apparent strain on resources to begin with. My goal is to find why/what on boot is causing the slow load, and why recycling the app pool fixes it. –  JuanValdez Jul 24 '12 at 21:20
add comment

After an upgrade to PHP 5.3.15 the issue seems resolved. I am not sure if a re-install of the old version would have fixed things.

I did notice on the effected server that 4 php-cgi.exe processes were running, and upon recycle only one would be spun up (fixeing the problem).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.