1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

do not use localhost in config.php on Windows

Discussion in 'Server Configuration and Hosting' started by Swimmy, Jul 27, 2014.

  1. Swimmy

    Swimmy New Member

    $config['db']['host'] = ''; // not 'localhost'

    After suffering 1 second+ pages for more than a month, I made this simple change to the config.php file and page loads are 10x faster. For some reason having "localhost" adds a minimum of 1 second to EVERY page load. There is a huge difference in the user experience going form 1.08s to 0.08s.

    It is completely reproducible. Switch to the ip address, site fast. Switch it back, site slow.

    I know this has been mentioned in threads more than 1 year ago, but I didn't want to bump an old thread.

    I am not a server expert...I am guessing it may have something to do with DNS lookup capability. There is a 1 second timeout happening somewhere if I use localhost.
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. RoldanLT

    RoldanLT Well-Known Member

    Yeah, I'm using also on my CentOS server.

Share This Page