Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP / mysql slow on IIS

Posted on 2011-09-09
9
Medium Priority
?
1,167 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
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 111

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 111

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 111

Accepted Solution

by:
Ray Paseur earned 2000 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

916 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