Extremely long TTFB Topic is solved

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
Dutchm_Michael
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Nov 07, 2018 2:24 pm

Extremely long TTFB

Post by Dutchm_Michael » Wed Nov 07, 2018 3:04 pm

I am working on a new company site using Joomla 3.8 and the a custom template, viewable here: https://dutchmantreespade.com/zzdutchmantest/

The problem is, the site has an intermittent but cripplingly slow Time to First Byte issue, which can cause page loads to take in excess of 15 seconds.

First, the FPA dump:
Forum Post Assistant (v1.4.5 (Ganymede)) : 7th November 2018 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.9.0-Stable (Amani) 30-October-2018
Joomla! Platform :: Joomla Platform 13.1.0-Stable (Curiosity) 24-Apr-2013
Joomla! Configured :: Yes | Read-Only (444) | Owner: --protected-- . (uid: 1/gid: 1) | Group: --protected-- (gid: 1) | Valid For: 3.9
Configuration Options :: Offline: false | SEF: true | SEF Suffix: true | SEF ReWrite: true | .htaccess/web.config: Yes | GZip: false | Cache: true | CacheTime: 10 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: false | Proxy: false | LiveSite: | Session lifetime: 60 | Session handler: database | Shared sessions: false | SSL: 2 | Error Reporting: default | Site Debug: false | Language Debug: false | Default Access: 1 | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 3.9.0: Yes | Database Credentials Present: Yes |

Host Configuration :: OS: Linux | OS Version: 3.10.0-714.10.2.lve1.5.19.8.el7.x86_64 | Technology: x86_64 | Web Server: Apache | Encoding: gzip, deflate, br | Doc Root: --protected-- | System TMP Writable: Yes | Free Disk Space : 676.52 GiB |

PHP Configuration :: Version: 7.2.11 | PHP API: litespeed | Session Path Writable: Yes | Display Errors: | Error Reporting: 32759 | Log Errors To: error_log | Last Known Error: 05th November 2018 10:33:38. | Register Globals: | Magic Quotes: | Safe Mode: | Open Base: | Uploads: 1 | Max. Upload Size: 64M | Max. POST Size: 64M | Max. Input Time: 120 | Max. Execution Time: 120 | Memory Limit: 128M

Database Configuration :: Connection Error: 2005:Unknown MySQL server host 'localhost:3306' (0) : Database Credentials Present? in Configuration...
Detailed Environment :: wrote:PHP Extensions :: Core (7.2.11) | date (7.2.11) | libxml (7.2.11) | openssl (7.2.11) | pcre (7.2.11) | sqlite3 (7.2.11) | zlib (7.2.11) | bz2 (7.2.11) | calendar (7.2.11) | ctype (7.2.11) | curl (7.2.11) | hash (1.0) | filter (7.2.11) | ftp (7.2.11) | gettext (7.2.11) | gmp (7.2.11) | SPL (7.2.11) | iconv (7.2.11) | pcntl (7.2.11) | readline (7.2.11) | Reflection (7.2.11) | session (7.2.11) | standard (7.2.11) | shmop (7.2.11) | SimpleXML (7.2.11) | mbstring (7.2.11) | tokenizer (7.2.11) | xml (7.2.11) | litespeed () | bcmath (7.2.11) | dba (7.2.11) | dom (20031129) | enchant (7.2.11) | fileinfo (1.0.5) | gd (7.2.11) | imagick (3.4.3RC4) | imap (7.2.11) | intl (1.1.0) | json (1.6.0) | ldap (7.2.11) | exif (7.2.11) | mongodb (1.5.2) | mysqli (7.2.11) | mysqlnd (mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $) | odbc (7.2.11) | PDO (7.2.11) | pdo_mysql (7.2.11) | PDO_ODBC (7.2.11) | pdo_pgsql (7.2.11) | pdo_sqlite (7.2.11) | pgsql (7.2.11) | Phar (2.0.2) | posix (7.2.11) | pspell (7.2.11) | snmp (0.1) | soap (7.2.11) | sockets (7.2.11) | sysvmsg (7.2.11) | sysvsem (7.2.11) | sysvshm (7.2.11) | wddx (7.2.11) | xmlreader (7.2.11) | xmlrpc (7.2.11) | xmlwriter (7.2.11) | xsl (7.2.11) | zip (1.15.3) | ionCube Loader () | Zend OPcache (7.2.11) | Zend Engine (3.2.0) |
Potential Missing Extensions ::

Switch User Environment (Experimental) :: PHP CGI: No | Server SU: No | PHP SU: No | Custom SU (LiteSpeed/Cloud/Grid): Yes
Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (---) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) | administrator/logs/ (755) |

Elevated Permissions (First 10) ::
Extensions Discovered :: wrote:Components :: SITE ::
Core :: com_wrapper (3.0.0) | com_mailto (3.0.0) |
3rd Party::

Components :: ADMIN ::
Core :: com_contenthistory (3.2.0) | com_privacy (3.9.0) | com_joomlaupdate (3.6.2) | com_finder (3.0.0) | com_languages (3.0.0) | com_templates (3.0.0) | com_postinstall (3.2.0) | com_users (3.0.0) | com_content (3.0.0) | com_media (3.0.0) | com_admin (3.0.0) | com_checkin (3.0.0) | com_installer (3.0.0) | com_associations (3.7.0) | com_tags (3.1.0) | com_modules (3.0.0) | com_actionlogs (3.9.0) | com_cache (3.0.0) | com_newsfeeds (3.0.0) | com_login (3.0.0) | com_ajax (3.2.0) | com_cpanel (3.0.0) | com_plugins (3.0.0) | com_menus (3.0.0) | com_redirect (3.0.0) | com_banners (3.0.0) | com_fields (3.7.0) | com_config (3.0.0) | com_search (3.0.0) | com_categories (3.0.0) | com_messages (3.0.0) |
3rd Party:: com_djimageslider (3.2.3) | Library - Yireo (0.2.10) | COM_SCRIPTMERGE (0.10.10) | COM_K2 (2.9.0) | JotCache (6.2.1) |

Modules :: SITE ::
Core :: mod_articles_categories (3.0.0) | mod_articles_news (3.0.0) | mod_syndicate (3.0.0) | mod_feed (3.0.0) | mod_random_image (3.0.0) | mod_login (3.0.0) | mod_whosonline (3.0.0) | mod_breadcrumbs (3.0.0) | mod_wrapper (3.0.0) | mod_tags_similar (3.1.0) | mod_related_items (3.0.0) | mod_banners (3.0.0) | mod_stats (3.0.0) | mod_finder (3.0.0) | mod_custom (3.0.0) | mod_articles_archive (3.0.0) | mod_languages (3.5.0) | mod_articles_popular (3.0.0) | mod_tags_popular (3.1.0) | mod_menu (3.0.0) | mod_search (3.0.0) | mod_articles_category (3.0.0) | mod_articles_latest (3.0.0) | mod_footer (3.0.0) | mod_users_latest (3.0.0) |
3rd Party:: DJ-ImageSlider (3.2.3) | Simple Email Form (2.2.0) | K2 User (2.9.0) | K2 Users (2.9.0) | K2 Tools (2.9.0) | sigplus (1.5.0.266) | K2 Content (2.9.0) | K2 Comments (2.9.0) |

Modules :: ADMIN ::
Core :: mod_toolbar (3.0.0) | mod_feed (3.0.0) | mod_stats_admin (3.0.0) | mod_logged (3.0.0) | mod_latestactions (3.9.0) | mod_login (3.0.0) | mod_quickicon (3.0.0) | mod_sampledata (3.8.0) | mod_custom (3.0.0) | mod_status (3.0.0) | mod_version (3.0.0) | mod_privacy_dashboard (3.9.0) | mod_title (3.0.0) | mod_menu (3.0.0) | mod_popular (3.0.0) | mod_submenu (3.0.0) | mod_latest (3.0.0) | mod_multilangstatus (3.0.0) |
3rd Party:: K2 Stats (admin) (2.9.0) | K2 Quick Icons (admin) (2.9.0) |

Plugins :: SITE ::
Core :: plg_user_terms (3.9.0) | plg_user_joomla (3.0.0) | plg_user_profile (3.0.0) | plg_user_contactcreator (3.0.0) | plg_quickicon_extensionupdate (3.0.0) | plg_quickicon_phpversioncheck (3.7.0) | plg_quickicon_joomlaupdate (3.0.0) | plg_quickicon_privacycheck (3.9.0) | plg_authentication_ldap (3.0.0) | plg_authentication_gmail (3.0.0) | plg_authentication_cookie (3.0.0) | plg_authentication_joomla (3.0.0) | plg_fields_user (3.7.0) | plg_fields_textarea (3.7.0) | plg_fields_checkboxes (3.7.0) | plg_fields_imagelist (3.7.0) | plg_fields_url (3.7.0) | plg_fields_list (3.7.0) | plg_fields_color (3.7.0) | plg_fields_calendar (3.7.0) | plg_fields_integer (3.7.0) | plg_fields_usergrouplist (3.7.0) | plg_fields_repeatable (3.9.0) | plg_fields_sql (3.7.0) | plg_fields_media (3.7.0) | plg_fields_editor (3.7.0) | plg_fields_radio (3.7.0) | plg_fields_text (3.7.0) | PLG_SYSTEM_ACTIONLOGS (3.9.0) | plg_system_logrotation (3.9.0) | plg_system_languagecode (3.0.0) | plg_system_fields (3.7.0) | plg_system_privacyconsent (3.9.0) | plg_system_cache (3.0.0) | plg_system_p3p (3.0.0) | plg_system_debug (3.0.0) | plg_system_highlight (3.0.0) | plg_system_remember (3.0.0) | plg_system_stats (3.5.0) | plg_system_languagefilter (3.0.0) | plg_system_log (3.0.0) | plg_system_sef (3.0.0) | plg_system_updatenotification (3.5.0) | plg_system_redirect (3.0.0) | plg_system_sessiongc (3.8.6) | plg_system_logout (3.0.0) | PLG_ACTIONLOG_JOOMLA (3.9.0) | plg_privacy_user (3.9.0) | plg_privacy_actionlogs (3.9.0) | plg_privacy_message (3.9.0) | plg_privacy_consents (3.9.0) | plg_privacy_content (3.9.0) | plg_editors-xtd_fields (3.7.0) | plg_editors-xtd_article (3.0.0) | plg_editors-xtd_menu (3.7.0) | plg_editors-xtd_image (3.0.0) | plg_editors-xtd_module (3.5.0) | plg_editors-xtd_pagebreak (3.0.0) | plg_editors-xtd_readmore (3.0.0) | plg_search_newsfeeds (3.0.0) | plg_search_contacts (3.0.0) | plg_search_content (3.0.0) | plg_search_tags (3.0.0) | plg_search_categories (3.0.0) | plg_finder_newsfeeds (3.0.0) | plg_finder_contacts (3.0.0) | plg_finder_content (3.0.0) | plg_finder_tags (3.0.0) | plg_finder_categories (3.0.0) | plg_content_fields (3.7.0) | plg_content_emailcloak (3.0.0) | plg_content_pagenavigation (3.0.0) | plg_content_pagebreak (3.0.0) | plg_content_confirmconsent (3.9.0) | plg_content_finder (3.0.0) | plg_content_vote (3.0.0) | plg_content_joomla (3.0.0) | plg_content_loadmodule (3.0.0) | plg_twofactorauth_totp (3.2.0) | plg_twofactorauth_yubikey (3.2.0) | plg_extension_joomla (3.0.0) | plg_captcha_recaptcha_invisibl (3.8) | plg_captcha_recaptcha (3.4.0) | PLG_INSTALLER_URLINSTALLER (3.6.0) | PLG_INSTALLER_FOLDERINSTALLER (3.6.0) | plg_installer_packageinstaller (3.6.0) |
3rd Party:: User - K2 (2.9.0) | JotCache (6.2.1) | JotMarker (6.2.1) | PLG_SYSTEM_SCRIPTMERGE (0.10.12) | plg_system_ossystem (1.3.0) | plg_system_tabs (7.4.3) | plg_system_regularlabs (18.10.1468) | System - K2 (2.9.0) | Crawler Extended (6.2.1) | Crawler (6.2.1) | Recache (6.2.1) | plg_editors-xtd_tabs (7.4.3) | plg_editors-xtd_sigplus (1.5.0.266) | Search - K2 (2.9.0) | plg_search_sigplus (1.5.0.266) | plg_finder_k2 (2.9.0) | PLG_EMBED_GOOGLE_MAP (2.1.0) | PLG_EASYCONTENTRESTRICTION (3.4.2) | JotLoadmodule (6.2.1) | plg_content_[youtube] (3.3.11) | googleMaps (3.0.30) | plg_content_sigplus (1.5.0.266) | plg_editors_codemirror (5.40.0) | plg_editors_tinymce (4.5.8) |
Templates Discovered :: wrote:Templates :: SITE :: protostar (1.0) | beez3 (3.1.0) | Dutchman (0.1) |
Templates :: ADMIN :: hathor (3.0.0) | isis (1.0) |
Entering debugging mode in Joomla reveals normal query times, so it seems to not be a SQL issue. Disabling Joomla plugins has no affect. The site is built using K2 but that does not seem to be the source of the issue. A fresh install of Joomla only demonstrated the problem once with a quicker TTFB (around 9 seconds) but then otherwise acted normally.

A local version of the site running on XAMPP only showed the problem when XAMPP was reinstalled to a different directory to test an older version of PHP. This leads me to suspect there is some sort of residual reference or cache to the old local directory where the site was located during development. The site also seems to have the problem less frequently for a user the more that individual user visits it, suggesting a caching issue. Purging Joomla's cache and changing the caching settings have no affect, though. I have scoured the template and Joomla settings for an old localhost reference and found none. I tried Jotcache and it did not help (in fact it broke many of the site's pages).

My best guess is there is a request for a local file somewhere, and the server is trying to get to it until it times out after 14ish seconds. I have no idea where, or how to even test for this. Any suggestions on where to start would be appreciated.

I am going to try the site again on a fresh Joomla install, but I am not optimistic that will solve the problem.
Last edited by toivo on Wed Nov 07, 2018 3:52 pm, edited 1 time in total.
Reason: mod note: disabled smilies in post Options for readability

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2033
Joined: Sun May 04, 2008 12:37 pm

Re: Extremely long TTFB

Post by waarnemer » Wed Nov 07, 2018 7:29 pm

Well.. I am visiting your site from the Netherlands (being Dutch ;) ) for both old https://dutchmantreespade.com/ and new (I guess?) https://dutchmantreespade.com/zzdutchmantest/ I see different results.. sometimes TTFB is short, sometimes it is way out of a normal behavior... too long... noting to do with the CMS used.

TTFB means Time To First Byte.. which actually is the time a server needs to react on the request.

Since you are on a shared host ( i see 900+ sites on the IP address ) someone or more is/are probably getting a lot of attention.. meaning visitors... too many visitors visiting the same server your site is on...

You may want to check with your hosting provider. If one of your fellow "share holders" is using too many resources..

Dutchm_Michael
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Nov 07, 2018 2:24 pm

Re: Extremely long TTFB

Post by Dutchm_Michael » Wed Nov 07, 2018 7:43 pm

waarnemer wrote:
Wed Nov 07, 2018 7:29 pm
Well.. I am visiting your site from the Netherlands (being Dutch ;) ) for both old https://dutchmantreespade.com/ and new (I guess?) https://dutchmantreespade.com/zzdutchmantest/ I see different results.. sometimes TTFB is short, sometimes it is way out of a normal behavior... too long... noting to do with the CMS used.

TTFB means Time To First Byte.. which actually is the time a server needs to react on the request.

Since you are on a shared host ( i see 900+ sites on the IP address ) someone or more is/are probably getting a lot of attention.. meaning visitors... too many visitors visiting the same server your site is on...

You may want to check with your hosting provider. If one of your fellow "share holders" is using too many resources..
This may be the case. I thought the current site (www.dutchmantreespade.com) did not have this problem (not exactly the same one at least: the slider on the front page has always been obnoxious as far as loading is concerned) but, after checking on another computer in a private browser window, it does crop up (if rarely). Given the relative sophistication of the old and new sites, it does make sense that the new one would demand more resources and therefore have the issue more frequently. I just tried a fresh install of Joomla with only the template and some light dummy data and that did not have the slow TTFB issue, but again that makes sense since the server is doing less without actual content and plugins.

I'll contact my host and see if we can address the issue. I have done little work on optimizing the site, since I have been grappling with this problem, but that might actually help resolve it.

Dutchm_Michael
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Nov 07, 2018 2:24 pm

Re: Extremely long TTFB

Post by Dutchm_Michael » Mon Dec 03, 2018 4:51 pm

This slowdown was indeed caused by a server-side bug, which has since been resolved. Remember to check your hosting before assuming you did something wrong!


Post Reply

Return to “Performance - Joomla! 3.x”