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

Moved XenForo to new server and now it's slow - 240s load time

Discussion in 'Server Configuration and Hosting' started by drsprite, Oct 6, 2016.

  1. drsprite

    drsprite New Member

    Hi there, I backed up my files and database and moved to a new server. The website takes upwards of 240 seconds to load now.

    I have disabled all add ons, and reverted back to default theme. Still very very slow.

    internal_data and data directories are both chmod -R 777 as well.

    URL did not change, just server hardware/software upgrade

    Wondering if my new server is missing an Apache mod, or caching is stuck? or any other thoughts?

    It is http://blocktown.org
     
  2. fly

    fly Active Member

    Have you contacted your host? I'd start there.

    Otherwise, does a simple 'hello world' HTML test page display?
     
  3. drsprite

    drsprite New Member


    It's a VPS - so I am the "host". Also, not my first VPS - but it is my first XF.

    Hello world, and a dozen other WP sites work. It's just the 1 (and only) XF site that's not working.
     
  4. fly

    fly Active Member

    drsprite likes this.
  5. drsprite

    drsprite New Member

    Just did; flying colors

    Code:
    XenForo System Requirements Test
    Requirements Met
    Your server meets all of XenForo's PHP requirements.
    
    XenForo also requires MySQL 5.0 or newer. Please manually check that you meet this requirement.
    
    Also;

    Code:
     mysql --version
    mysql  Ver 15.1 Distrib 5.5.50-MariaDB, for Linux (x86_64) using readline 5.1
    
     
  6. drsprite

    drsprite New Member

    To be clear, XF does work if you want to wait the 2.2 minutes load time.

    So maybe slow SQL queries?

    This is a mirror copy from my old VPS (which is still online). Things seem mostly identical
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    This works: http://blocktown.org/rgba.php
    Which shows that general server performance is okay (it doesn't hit the database).

    This also works: http://blocktown.org/sitemap.php
    Which proves that a connection can be made to the database.

    As does this: http://blocktown.org/deferred.php

    That would suggest the error is more fundamental to the server configuration and set up.
    You will have to start monitoring and checking logs, etc. to determine why pages are taking so long to be served.
     
    drsprite likes this.
  8. drsprite

    drsprite New Member

    Yep - needle, meet haystack.
     
  9. fly

    fly Active Member

    Have you done any tweaking of the webserver? Any errors in the logs?
     
  10. drsprite

    drsprite New Member

    No tweaking yet - just basic LAMP setup ATM with the XF prereq's installed.

    Error log for this Apache virtualhost is empty currently.
     
  11. drsprite

    drsprite New Member

    Just enabled MySQL slow query logging, and nothing showed up in the log. Still puzzled.
     
  12. drsprite

    drsprite New Member

    Exactly right. This website has a few MySQL queries to a remote MySQL host that I forgot about. Once I remember them, I then forgot to add some firewall rules.... *facepalm*.

    I'm good to go now. It's always the "simple" things that are overlooked...

    Thanks for the help!
     
    SneakyDave likes this.
  13. king8084

    king8084 Active Member

    New relic will help
     
  14. Digital Doctor

    Digital Doctor Well-Known Member

    For the benefit of future webmasters ... what did you need to add ?
    You definitely aren't the first or last to overlook firewall rules.
    Post how you figured it out to help others do the same !
     
  15. drsprite

    drsprite New Member

    Sure, on my remote (non Xenforo) host, which is Ubuntu today, I had to allow explicit permission to port 3306 from my new VPS IP.

    The problem with the 240 seconds was simply a timeout and my server giving up on trying to get a response from the remote MySQL database. Once I remember to open the port, all is well.

    Anyways, this is for Ubuntu using ufw, and is not anything special (a Google search will yield the same sample code).

    Code:
    ufw allow from 1.2.3.4 to any port 3306
    
    Replace 1.2.3.4 with your host IP
     
  16. Jake B.

    Jake B. Well-Known Member

    +1 this, New Relic is amazing, but can get expensive fast
     
  17. Tracy Perry

    Tracy Perry Well-Known Member

    yeah, typically you have to allow the MySQL port in most firewalls. In CSF it's handled via the
    Code:
    TCP_IN =
    TCP_OUT =
    TCP6_IN =
    TCP6_OUT =
    
    setting in csf.conf for both IPv4 and IPv6.
     

Share This Page