Solved

PHP / mysql slow on IIS

Posted on 2011-09-09
9
1,141 Views
Last Modified: 2012-05-12
Hi, we have reprogram our site with PHP / MYSQL.  We are hosting our site on IIS 7.5 on windows Server 2008 STD R2.  They have used PHP and MYSQL.  IP6 is disable on the network Interface.  We have a 10mb fiber link.  When someone is going to the site, it takes about 5-10 second to respond.  Any idea what that problem can be?  
0
Comment
Question by:polycorjsp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 36511103
It could be any number of things.  Check the server logs and see if there are any clues there.  

http://portal.smartertools.com/KB/a154/where-are-my-iis-log-files-stored.aspx
http://www.cisco.com/en/US/products/sw/custcosw/ps747/products_tech_note09186a0080094808.shtml

There are many tools that might help, free and cots, such as:
http://www.weblogexpert.com/lite.htm


0
 
LVL 4

Expert Comment

by:vaibhavjaiman
ID: 36511331
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 36516355
You might want to install this free and open source toolset:

Firefox Browser
Firebug Plug-in
YSlow Plug-in

Those can give you some pretty good clues.  But if a simple script takes 5-10 seconds, the server may be involved in error recovery.  Have you tried a simple "hello world" script?  How long would it take to run this script:

<?php phpinfo();
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:polycorjsp
ID: 36540968
Ray Paseur,  it took 2 seconds to load...  I think the problem is the PHP with MySQL..

Is it possible?
0
 

Author Comment

by:polycorjsp
ID: 36541056
Another thing that I have notice is when I'm going to my site
http://www.mysite.com it takes about 10 second and then, the adress is changing to http://www.mysite.com/eng and then, the site is loading

I hope this help!
Thanks!
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 36542310
What is the actual URL of the site.  We might be able to help better if we could look at it and see it in action.

The changing URL should be explained by rewrite rules or header() redirects or meta refresh tags.  Which one is it?  Or are there a combination of those in play?
0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 36545487
Looks like the site is built with CakePHP
http://en.wikipedia.org/wiki/Cakephp

With general-purpose web application frameworks you often get a lot of "extra" programming and files.  With the phpinfo() script the response was essentially instantaneous, clearly sub-second.

The phenomenon you mentioned about seeing the site redirect to a page named /eng may be some kind of Cake-related internationalization that is choosing English language.  Unquestionably that is part of the overhead that is making things slower than they need to be.

There are a lot of moving pictures.  They look great but they take time to load and run.  It's a tradeoff -- beauty vs performance.

Firebug reported these.  The speed of the 404 handler might be in play, and in any case it is worth correcting a "not found" condition.
"NetworkError: 404 Not Found - http://www.polycor.com/img/menu/separator.png"
"NetworkError: 404 Not Found - http://www.polycor.com/js/infinitecarousel/images/caption.gif"
"NetworkError: 404 Not Found - http://www.polycor.com/js/infinitecarousel/images/caption.gif"

Using Firefox, Firebug and Yslow here is what I see...
Grade C - load time about 10 seconds.  Total response size 790KB

Key elements:

Make fewer HTTP requests
This page has 10 external Javascript scripts. Try combining them into one.
This page has 3 external stylesheets. Try combining them into one.
This page has 33 external background images. Try combining them with CSS sprites.

Use a Content Delivery Network (CDN)
There are 71 static components that are not on CDN.

Add Expires headers
There are 75 static components without a far-future expiration date.

Compress components with gzip
There are 11 plain text components that should be sent compressed

Put JavaScript at bottom
There are 9 JavaScript scripts found in the head of the document

Configure entity tags (ETags)
There are 70 components with misconfigured ETags
http://en.wikipedia.org/wiki/HTTP_ETag

Use cookie-free domains
There are 12 components that are not cookie-free

Avoid AlphaImageLoader filter
There are a total of 16 filters
0
 

Author Closing Comment

by:polycorjsp
ID: 36574347
Thanks for your help!  I will keep your contact information
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question