Solved

PHP / mysql slow on IIS

Posted on 2011-09-09
9
1,077 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 108

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
 

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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 108

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
 

Author Comment

by:polycorjsp
ID: 36545023
0
 
LVL 108

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mysql sync between 3-4 mysql db 4 25
datetime in sql 6 31
is this a cms? 8 35
Could you point how to give Bootstrap's open/ close menu effect ? 25 34
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now