No announcement yet.

My page takes forever to load, why?

This topic is closed.
This is a sticky topic.
  • Filter
  • Time
  • Show
Clear All
new posts

  • My page takes forever to load, why?

    This is a linux solution.

    A good way to start is to check what is keeping it from running via command line. So, after you login as root, go to the directory where the page file that you are trying to load in the browser is located. Most likely it's either an .html or a .php file (index.php for example).

    1. Run that file in the background
    php index.php&
    The & symbol will run the process in the background.

    2. Now find the PID of the running process
    ps aux |grep index.php
    3. Now, trace the process using PID
    lsof -p PID
    Replace PID with the actual process number you found using the command in step 2. It may take a bit to run. After it does, the last line will most likely be the one that is causing the problem. From there, you can use something like netstat to see what's listening/connecting on a port, etc..

    The above is a good way to start troubleshooting and more likely than not, you'll be able to find the problem.
    From Shared to Dedicated
    Professional. Painless. Polite.