Pages Ridiculously Slow At Loading

Permalink 1 user found helpful
I am taking over the hosting of a website for a client, but before I do a full transfer I have been trying to set up the site on a subdomain (thefnt.nighthawksoftware.com).

After some playing around, I have managed to get the site working, however it is seriously slow. There appears to be a pause of approximately 10 seconds before any of the pages download.

Is there a troubleshooting guide on how to fix this, or some sort of debugging/logging mode I can enable that will shed some light onto why this is taking so long to render?

A clean install of Concrete runs almost instantly on the same setup.

The website is configured with Concrete 5.4.2.1, but upgraded to 5.5.2.1. The webserver is running PHP 5.2 with Memcache enabled, but I've also tried 5.3 and 5.4 (without memcache and PEAR support). The webserver is running Windows 2008 R2, controlled through Plesk 11.

Any hints would be greatly appreciated, as I have never used Concrete before.

 
s2d replied on at Permalink Reply
s2d
Just a wild guess... is there a redirect page, in the root of your subdomain, that has a 10 second delay in it? It's almost exactly 10 seconds, which makes my first guess that it's something that was programmed in for some reason.
gavco98uk replied on at Permalink Reply
It does seem to be consistently pausing for 10 seconds. As far as I can see there is no pause in there. There is an index.php file, which simply includes 'concrete/dispatcher.php'.

I have however noticed there is a massive CPU spike on the machine when the page is requested, ending roughly as the page starts to load.
exchangecore replied on at Permalink Reply
exchangecore
The cpu spike sounds suspicious. Can you narrow down the process that is pegging? Is it php? MySQL maybe? Something else like antivirus?
mhawke replied on at Permalink Reply
mhawke
I'm wondering if the Typekit license is a problem on the subdomain. The page is hitting a '403 Forbidden' on one of the typekit files. Feed your URL into tools.pingdom.com and check out the loading times.
gavco98uk replied on at Permalink Reply
I'm still trying to fix this issue, so any further help would be greatly appreciated. I'm still trying to find my way around Concrete too, which isn't helping.

I've moved to a new server, which I thought would resolve the issue as I have noticed issues in the past with PHP being a bit slow, but no dice. I've now transferred the hosting over, so really need to get this fixed ASAP.

Below is a dump of the environment settings, hopefully that might shed some light on something.

# concrete5 Version
5.5.2.1

# concrete5 Packages
Add Multiple Pages (2.1), Ajax Form (1.3), Basic Forum (1.0), Contest (1.1.1), Deluxe Image Gallery (1.6.6), Designer Content (3.1.1), Discussion (1.8.6), eCommerce (2.8.6), eCommerce Product Slider (1.1.3), eCommerce Regional Shipping (1.1), Events (1.4), FlexSlider (2.0.5.2), Galleria image gallery (2.0), I Belong: The Paid Membership Add-On (2.0.1), Login (1.1), Mail Monkey (2.1.2), Page Mapper (2.0), Page Properties (1.0.1), Page Redirect (1.0), Page Redirect To Newest Child (1.0), Page Selector Attribute (1.0), Paypal Website Payment Pro Gateway (2.0), ProEvents (6.2.2), ProEvents Booking (3.1.6), Pure Web Avatars (1.0.7.1), Sidebar Cart (0.9), Tables (2.3.1), Tweetcrete (1.6.5), Zone Based Shipping (1.8).

# concrete5 Overrides
blocks/autonav, blocks/blocktext, blocks/cart_links, blocks/form, blocks/image_link_block, blocks/link_block, blocks/page_list, blocks/plain_text, blocks/plain_text_linked, blocks/product_list, blocks/restrictions.php, blocks/results_row, blocks/search, blocks/youtube, helpers/menu.php, js/jquery.color.js, js/jquery.easing.1.2.js, js/site.js, themes/fsnt, tools/custom_background.php

# Server Software
Microsoft-IIS/7.5

# Server API
cgi-fcgi

# PHP Version
5.4.23

# PHP Extensions
bcmath, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, filter, ftp, gd, gettext, hash, iconv, imap, ionCube Loader, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, odbc, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, pdo_sqlsrv, Phar, Reflection, session, SimpleXML, sockets, SPL, sqlite3, sqlsrv, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.

# PHP Settings
log_errors_max_len - 1024
max_execution_time - 5
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 10M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pdo_sqlsrv.client_buffer_max_kb_size - 10240
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
Steevb replied on at Permalink Reply
Steevb
You really need to try updating.
gavco98uk replied on at Permalink Reply
I tried upgrading - it just bricks the whole site when I do that.
gavco98uk replied on at Permalink Reply
If I update to the latest version (via the dashboard), afterwards I get a "Page Forbidden" error on every single page, including the dashboard.
SheldonB replied on at Permalink Reply
SheldonB
also you might want to turn off fast cgi
cgi-fcgi

I don't think concrete5 plays well with fast cgi yet
gavco98uk replied on at Permalink Reply
surely the mode PHP runs in shouldn't make any difference to the application itself?

I've tried all 3 modes, and it doesn't appear to make any difference - still slow.
SheldonB replied on at Permalink Reply
SheldonB
just going through the forms there are a few people that have turned it off and it has helped its the only reason why i mentioned it
arunas replied on at Permalink Reply
I have same issue, just installed a fresh new site. each page load takes up to 30 sec.


# concrete5 Version
Core Version - 5.7.3
Version Installed - 5.7.3
Database Version - 20141219000000

# concrete5 Packages
None

# concrete5 Overrides
languages/da_DK, languages/de_DE, languages/el_GR, languages/fi_FI, languages/fr_FR, languages/it_IT, languages/ja_JP, languages/nl_NL, languages/ru_RU, languages/sl_SI, languages/sv_SE, languages/tr_TR

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - In all cases.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.10 (FreeBSD) OpenSSL/1.0.1j-freebsd mpm-itk/2.4.7-02 PHP/5.5.20 mod_perl/2.0.9-dev Perl/v5.18.4

# Server API
apache2handler

# PHP Version
5.5.20

# PHP Extensions
apache2handler, Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, Phar, Reflection, session, SimpleXML, sockets, SPL, standard, tokenizer, xml, xmlreader, xmlwriter, Zend OPcache, zip, zlib.

# PHP Settings
max_execution_time - 120
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 120M
sql.safe_mode - Off
upload_max_filesize - 40M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
WebcentricLtd replied on at Permalink Reply
Hi,
if you are able to post your URL somebody would be able to do a quick check to see if there is anything obvious that jumps up about the page loading.

What kind of hosting are you on: shared / VPS / dedicated?
arunas replied on at Permalink Reply
Apologies, I forgot. here is the linkhttp://zulu.vbox.lt/c5_demo/
server is ESXi host and not overloaded. I have 2 forums runnig very fast.
Steevb replied on at Permalink Reply
Steevb
Your page is very slow to load, to help with issues use:http://www.webpagetest.org/

You need to add gzip and expires to your htaccess file.

For example this is something I put in my htaccess file:

<FilesMatch "\.(htm|html|php)$">
    <IfModule mod_headers.c>
        Header set X-UA-Compatible "IE=Edge, chrome=1"
    </IfModule>
</FilesMatch>
<IfModule mod_expires.c>
 ExpiresActive on
 ExpiresDefault  "access plus 1 month"
ExpiresByType image/x-icon   "access plus 1 week"
ExpiresByType image/gif    "access plus 1 month"
ExpiresByType image/png    "access plus 1 month"
ExpiresByType image/jpeg    "access plus 1 month"
ExpiresByType application/pdf    "access plus 1 month"
ExpiresByType application/x-javascript    "access plus 1 month"
ExpiresByType text/plain    "access plus 1 month"
mhawke replied on at Permalink Reply
mhawke
While I agree with Steevb's advice, I think there is a hidden php error hanging the page. Can you go to Dashboard->System and Settings->Debug Settings and make sure all the errors messages are being dsplayed? If you look at the waterfall for this page, you will see that all the assets load in a fairly decent time but the page hangs for a long time and I can't see what file/js/css/image is actually causing the long delay. Also, this validator claims that there is a 'non-document error' that halts the validation process :http://html5.validator.nu/
BrianTucker replied on at Permalink Reply 1 Attachment
I recently moved my local site (blazing fast) to a test server while we continue to develop... It takes literally 30 seconds before the page starts to load. Once the loading process begins, it is fast. But it takes ~30 seconds before that begins. It's almost laughable. All other sites I have on this serve load in ~300ms or so.

[Link removed, site down, transferring hosts]

# concrete5 Version
Core Version - 5.7.3.1
Version Installed - 5.7.3.1
Database Version - 20150109000000

# concrete5 Packages
Likes This! (2.0.1), ProEvents (2.2.1), Quick Pay (1.0.1), Responsive Embed (1.0.0), Touch Gallery (2.0.4), Zoomer (1.0.1).

# concrete5 Overrides
blocks/autonav, languages/da_DK, languages/de_DE, languages/el_GR, languages/fi_FI, languages/fr_FR, languages/it_IT, languages/ja_JP, languages/nl_NL, languages/ru_RU, languages/sl_SI, languages/sv_SE, languages/tr_TR, themes/ef

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.3.24

# PHP Extensions
apc, bcmath, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, pspell, Reflection, session, SimpleXML, soap, SPL, SQLite, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 30
apc.max_file_size - 1M
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 64M
post_max_size - 33M
safe_mode - Off
safe_mode_exec_dir - /usr/local/php/bin
safe_mode_gid - Off
safe_mode_include_dir - ~
sql.safe_mode - Off
upload_max_filesize - 32M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

Really hoping this is just some simple fix!
Steevb replied on at Permalink Reply
Steevb
Look at your code (view source), some errors (viewport 4 one).

To help isolate try: http://validator.w3.org/
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Another error is an image that is being called but the browser is unable to find it..
The css file has this code with a strange url call
.rslides_nav{
position:absolute;
-webkit-tap-highlight-color:rgba(0,0,0,0);
top:50%;left:0;z-index:99;opacity:0.7;
overflow:hidden;
text-decoration:none;
height:61px;width:38px;
background:transparent url("../../../../packages/proevents/blocks//../../../concrete/blocks/image_slider/images/arrows.gif") no-repeat left top;
margin-top:-45px}
BrianTucker replied on at Permalink Reply
Thanks guys. I (sort of) fixed the weird css call. That helped some with the load times, but they're still not optimal. I used the validator to see errors and none of them look like speed-affecting errors... I could be wrong though. It wouldn't even validate before because I defined viewport, which is apparently not allowed? So I removed that...
Still very confused.
mhawke replied on at Permalink Reply
mhawke
It looks much faster now. Did you do anything specific?

Update: sorry, false alarm. I was just testing your base domain and not your /ef installation.
BrianTucker replied on at Permalink Reply
So far I've:
-Added gzip
-Fixed all URLs that were misliked in the code according to safari's web inspector (all of these we caused by concrete5 and/or add ons...)
-Scratched my head
-Fixed my viewport code, which was somehow messed up.
-Changed from c5's less compiler to pre-compiled less.

Loading went from ~30s to now ~6s. 6 seconds still is not really optimal, especially because it takes 6 seconds or so for EACH page, with caching on. This little tidbit makes me think it's something with wrong with how c5 is doing things.


So it looks like the problem is the 'time to first byte'. According to some sources, these are potential causes of my issue:
"-External resource delays
Loading JavaScript or other resources from off-site can cause indeterminate delays for your own site. JQuery, advertising scripts, Google Plus One, Facebook, and other external resources are typically loaded with a remote JavaScript call to Google, Facebook, or some other busy site. Loading infrequently changing resources (like a programming library) remotely introduces DNS and network overhead, and indeterminate delay from a server you don't control. Solution: Periodically cache the resource locally on your server and serve locally. Use a CRON script to copy the resource.
-Inefficient SQL Queries
Database queries that are written poorly can cause slowdowns to web sites. Databases that aren't indexed properly can also cause slowdowns."

I know c5 uses quite a few external scripts. I saw a how-to for c5.6 on how to disable jquery if you don't use it on your site (I do not), but it is not compatible with c5.7
mhawke replied on at Permalink Reply
mhawke
Are you on GoDaddy? They are notoriously slow. In my experience, you can spend an enormous amount of time trying to fix a slow server or you can take an hour and move the site to a new host.
BrianTucker replied on at Permalink Reply
I am on Godaddy. I'm certainly not bound to them though. Any suggestions for affordable, decent speed hosting?
mhawke replied on at Permalink Reply
mhawke
MrKDilkington replied on at Permalink Reply
MrKDilkington
@mhawke

Have you used SiteGround's Varnish and Memcached features?
mhawke replied on at Permalink Reply
mhawke
The basic Varnish doesn't seem to improve the speed and it interfere's with the c5 caching which prompts support calls from clients so I have to turn Varnish off. The basic accounts I have with SiteGround don't provide access to Memcaching so I have no experience with that. Don't get me wrong, SiteGround is not perfect for every site because their range of hosting plans is quite limited but for the 'economy' client, I've found them to be quite good and their tech support folks seem to know what they are doing and respond to questions within a few minutes. Their 'chat' techs are also quite knowledgeable and can actually accomplish things on your behalf instead of wasting 15 minutes of your life before just putting in a ticket (which is what I've experienced with other 'chat' support systems)
CMSDeveloper replied on at Permalink Reply
CMSDeveloper
Hi!
@mhawke
Do you have a example url for a concrete5 website hosted by siteground?

Kind Regards
CMSDeveloper replied on at Permalink Reply
CMSDeveloper
Hi!
@mhawke
Do you have a example url for a concrete5 website hosted by siteground?

Kind Regards
mhawke replied on at Permalink Reply
mhawke
A question so nice, you asked it twice...

Here's a typical, image-intensive, css-intensive site

http://www.gladtidingschristmasshoppe.com/...

All caching off, Varnish off, compression turned on in the cPanel. Full page caching reduces the total load time from about 4 seconds to 3 seconds but my clients can't remember to turn off the caching when making changes and I get a support call so the 1 second gain is not worth the hassle.
Phallanx replied on at Permalink Reply
Phallanx
@mhawke

You are mot comparing apples with apples with that site as an example. Aren't they using 5.7?
mhawke replied on at Permalink Reply
mhawke
True, but I have a few sites under development using 5.7 located on SiteGround's Chicago server location and the speed is not noticeable slower. I have no live URL's on SG using 5.7 yet.

Sorry if I misled anyone. It was not my intention.
WebcentricLtd replied on at Permalink Reply
I'm just doing some testing on 5.7 prior to creating my first sites using it. In general I've seen no real speed issues even on budget hosting but it does seem from the last couple of reported problems that things can be really put awry by incorrect paths in css files etc.

Not something you'd necessarily expect and really something to watch out for. It does make me wonder about the assets loading in c5.7 and what overhead there is with this plus what extra niggles it can add.
mhawke replied on at Permalink Reply
mhawke
Another interesting thread on Stack Overflow. It's about WordPress but the issues are the same with most of the database-driven websites like c5.

http://wordpress.stackexchange.com/questions/14186/long-waiting-tim...
BrianTucker replied on at Permalink Reply
Wow! Thanks for the help. I'm looking into transferring hosting right now and that post you linked has me convinced. Even if it doesn't affect load speeds, I'll be rid of the beast at last.
mhawke replied on at Permalink Reply
mhawke
Let us know how it works out.
BrianTucker replied on at Permalink Reply
I've been busy but I've finally got everything moved over to Arvixe and I love it!

Time from first byte went from 30 seconds to 3! Thank you all for you help! I can further optimize it from here.
mhawke replied on at Permalink Reply
mhawke
Wonderful news!