Slow page loads - Script error?

Discussion in 'Site & Server Administration' started by Hade, Sep 15, 2007.

  1. #1
    Hi,
    Pages of my PHP site are loading mega slow, 50 second page load for a page which should load in <1 sec.

    I told my ISP, and they have blamed 'incorrect scripting.'
    IE Reports no javascript errors, none are shown in the pages and Apache logs no PHP errors etc.

    How can I trace this? I have tried removing the javascript, has no effect. How can I trace this?
    Thanks.
     
    Hade, Sep 15, 2007 IP
  2. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you using mysql?
    Maybe that and apache needs to be optimized?
    How is the server load?
     
    cyanide, Sep 15, 2007 IP
  3. Hade

    Hade Active Member

    Messages:
    701
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    90
    #3
    According to my ISP, server load is 'normal'.
    They blamed my script as my other html script on the same server loads fine. I said that this means nothing as it could be a problem with PHP/MySQL.

    How can I test for MySQL problems etc?
     
    Hade, Sep 15, 2007 IP
  4. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's a bit difficult to test mysql if you are a shared host, which I am assuming.

    I also assume that your script was working fine and fast at some point?
    Do you know if your server had crashed recently? Because that can cause mysql to corrupt.

    Maybe you can try optimizing your database? Do you have access to phpmyadmin?
    You can select the database from there, check all tables and at the bottom, click optimize. If your database is large, let's say larger than 100mb, phpmyadmin may time-out before this completes.

    I always hate it when hosts automatically blame the script.. usually it's laziness :)
     
    cyanide, Sep 15, 2007 IP
  5. Hade

    Hade Active Member

    Messages:
    701
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    90
    #5
    You're right:

    Hey presto, pages now load in 1 second rather that 50 seconds.
    I estimate that bouce rate could at least half. And conversion rate should increase too.

    Damn ISPs!!!
     
    Hade, Sep 15, 2007 IP
  6. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Nice!
    One they decided to look into it, they probably noticed something.
     
    cyanide, Sep 15, 2007 IP