Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Please help troubleshoot site slowness

    I have a web site which is written in PHP + Zend + JQuery.

    The landing page takes 1.6 - 2 sec while it loads very little data from the DB, so no heavy DB queries.

    I see in FireBug that the main request takes 1.5 or 2 seconds, while the rest of the scripts/images/csss are loaded after this

    site hosted on hostmonster, shared hosting.

    how can I troubleshoot it at what level I have a delay?

    I can't publish the site's URL, but I will PM it to you so you can check it in FireBug

    I'll buy you a beer if you could help me seriously

    Thank you very much

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,341
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    While it's not drawing much from the DB it doesn't mean that the server itself is capable of generating the page any quicker. It could have several thousand queries per second going through the DB and the CPU usage could be high. On shared hosts anything can happen.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    statistic

    Ok, here is what I see in FireBug

    (Also I set site protection using .htaccess .htpasswd maybe this might be the problem?)

    +915ms Request start time since the beginning
    Request phases start and elapsed time relative to the request start:
    0 265ms Blocking
    +265ms 0 DNS Lookup
    +265ms 0 Connecting
    +265ms 0 Sending
    +265ms 94ms Waiting
    +359ms 0 Receiving
    Event timing relative to the request start:
    +664ms DOMContentLoaded
    +2.05s load

    GET mydomain.com mydomain.com 0
    GET mydomain.com 200 OK mydomain.com 31.1 KB 74.220.215.56:80
    1.11s
    GET jquery.autocomplete.css 304 Not Modified mydomain.com 797 B 74.220.215.56:80
    265ms
    GET jquery.fancybox-1.3.4.css 304 Not Modified mydomain.com 8.3 KB 74.220.215.56:80
    265ms
    GET style.css 304 Not Modified mydomain.com 14.2 KB 74.220.215.56:80
    281ms
    GET custom.css 304 Not Modified mydomain.com 20.4 KB 74.220.215.56:80
    281ms
    GET jqtransform.css 304 Not Modified mydomain.com 8.5 KB 74.220.215.56:80
    296ms
    GET main.js 304 Not Modified mydomain.com 184.4 KB 74.220.215.56:80
    343ms
    GET jquery.autocomplete.min.js 304 Not Modified mydomain.com 14.2 KB 74.220.215.56:80
    359ms
    GET jquery.fancybox-1.3.4.js 304 Not Modified mydomain.com 27.6 KB 74.220.215.56:80
    406ms
    GET jquery.jqtransform.js 304 Not Modified mydomain.com 13.4 KB 74.220.215.56:80
    406ms
    GET cufon-yui.js 304 Not Modified mydomain.com 17.8 KB 74.220.215.56:80
    406ms
    GET Futura_500.font.js 304 Not Modified mydomain.com 46.8 KB 74.220.215.56:80
    406ms
    GET _badge.jpg 304 Not Modified mydomain.com 31.9 KB 74.220.215.56:80
    94ms
    GET like.php?href=http...nt=arial&height=21 200 OK facebook.com 6.1 KB 69.63.181.15:80
    140ms
    GET top_shadow.png 304 Not Modified mydomain.com 299 B 74.220.215.56:80
    125ms
    GET free_sign.png 304 Not Modified mydomain.com 3 KB 74.220.215.56:80
    140ms
    HeadersCache
    Response Headersview source
    Connection Keep-Alive
    Date Fri, 20 Jan 2012 22:44:58 GMT
    Etag "4e9c0d8-bdd-4b62fd7bc4280"
    Keep-Alive timeout=10, max=28
    Server Apache
    Request Headersview source
    Accept image/png,image/*;q=0.8,*/*;q=0.5
    Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Accept-Encoding gzip, deflate
    Accept-Language en-us,en;q=0.5
    Authorization Basic ZGVtbzpkZW1vMTIz
    Cache-Control max-age=0
    Connection keep-alive
    Cookie PHPSESSID=9n6uqjfrpqa9rpnrj2oppe2s63
    Host mydomain.com
    If-Modified-Since Tue, 10 Jan 2012 17:28:26 GMT
    If-None-Match "4e9c0d8-bdd-4b62fd7bc4280"
    Referer mydomain.com
    User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24 (.NET CLR 3.5.30729) WebMoney Advisor
    Response Headers From Cache
    Accept-Ranges bytes
    Content-Length 3037
    Content-Type image/png
    Date Fri, 20 Jan 2012 22:44:58 GMT
    Etag "4e9c0d8-bdd-4b62fd7bc4280"
    Last-Modified Tue, 10 Jan 2012 17:28:26 GMT
    Server Apache


    GET _step1pic.jpg 304 Not Modified mydomain.com 15.6 KB 74.220.215.56:80
    140ms
    GET _step2pic.jpg 304 Not Modified mydomain.com 17.8 KB 74.220.215.56:80
    156ms
    GET _step3pic.jpg 304 Not Modified mydomain.com 14.6 KB 74.220.215.56:80
    172ms
    GET steps_shadow.jpg 304 Not Modified mydomain.com 5.4 KB 74.220.215.56:80
    203ms
    GET bottom_shadow.png 304 Not Modified mydomain.com 315 B 74.220.215.56:80
    219ms
    GET ga.js 304 Not Modified google-analytics.com 13 KB 74.125.225.128:80
    109ms
    GET bg.jpg 304 Not Modified mydomain.com 3.7 KB 74.220.215.56:80
    110ms
    GET logo.png 304 Not Modified mydomain.com 26.9 KB 74.220.215.56:80
    125ms
    GET side_shadow.png 304 Not Modified mydomain.com 155 B 74.220.215.56:80
    125ms
    GET form_area_bg.png 304 Not Modified mydomain.com 87.2 KB 74.220.215.56:80
    141ms
    GET form_bg.png 304 Not Modified mydomain.com 34.9 KB 74.220.215.56:80
    157ms
    GET psaxno_bg.png 304 Not Modified mydomain.com 3.9 KB 74.220.215.56:80
    172ms
    GET select_bg.png 304 Not Modified mydomain.com 1.3 KB 74.220.215.56:80
    219ms
    GET vrisketai_bg.png 304 Not Modified mydomain.com 2.6 KB 74.220.215.56:80
    235ms
    GET search.png 304 Not Modified mydomain.com 5.8 KB 74.220.215.56:80
    328ms
    GET show_arrow.png 304 Not Modified mydomain.com 2.1 KB 74.220.215.56:80
    297ms
    GET steps_bg.jpg 304 Not Modified mydomain.com 3.7 KB 74.220.215.56:80
    313ms
    GET steps_title.jpg 304 Not Modified mydomain.com 45.9 KB 74.220.215.56:80
    328ms
    GET step1title.png 304 Not Modified mydomain.com 2.5 KB 74.220.215.56:80
    344ms
    GET step2title.png 304 Not Modified mydomain.com 3.1 KB 74.220.215.56:80
    344ms
    GET step3title.png 304 Not Modified mydomain.com 3.2 KB 74.220.215.56:80
    391ms
    GET r_u_title.png 304 Not Modified mydomain.com 2.1 KB 74.220.215.56:80
    406ms
    GET speciality_title.png 304 Not Modified mydomain.com 2.9 KB 74.220.215.56:80
    422ms
    GET arrow_right.png 304 Not Modified mydomain.com 986 B 74.220.215.56:80
    422ms
    GET insurance_title.png 304 Not Modified mydomain.com 3.3 KB 74.220.215.56:80
    437ms
    GET q_a_title.png 304 Not Modified mydomain.com 2.9 KB 74.220.215.56:80
    453ms
    GET futurastd-book-webfont.woff 304 Not Modified mydomain.com 21.5 KB 74.220.215.56:80
    172ms
    GET futurastd-heavy-webfont.woff 304 Not Modified mydomain.com 22.2 KB 74.220.215.56:80
    187ms
    GET dropdown_arrow.png 304 Not Modified mydomain.com 1.7 KB 74.220.215.56:80
    484ms
    GET YYZrixQZaWZ.js 200 OK static.ak.fbcdn.net 49.3 KB
    154ms
    GET qmP6DVX8EqF.css 200 OK static.ak.fbcdn.net 3.8 KB
    167ms
    47 requests 833.4 KB (796.2 KB from cache)
    2.93s (onload: 2.96s)

    --------------------------------------------------------------------------------------------------------------------------

    47 requests 833.4 KB (796.2 KB from cache)
    2.46s (onload: 2.56s)

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,341
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    Not much else I can say, you've not even acknowledged my last reply but just carried on posting more stuff which isn't really going to help.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #5
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tangoforce View Post
    Not much else I can say, you've not even acknowledged my last reply but just carried on posting more stuff which isn't really going to help.
    tangoforce, there are no other users working with my site at this moment. I think hostmonster provides enough resources to run not very complicated PHP/MySQL site in a single user mode

  • #6
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,341
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    You *think* but have no real idea. My previous post still stands - I reckon its the server you are on.

    Seeing as you haven't provided us anything else of any use (such as source code, a log of SQL queries your code is running per script call etc) then thats all any one here can say to you - the server.

    Posting more stuff about your http calls and headers is pointless as it only tells us whats happened and nothing much else of any use. Your opening post clearly states your script reads very little information from the database so that being the case, your server is either under heavy use or the internet connection its on is at its maximum capacity (easily confused with a strained server).

    Comprende?
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •